Skip to content

Commit

Permalink
Trap for another null pointer error
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Mar 17, 2017
1 parent 931f99c commit d7c1250
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export default class VisibilityComponent {
limitByAdminSet() {
if(this.adminSetWidget) {
this.adminSetWidget.on('change', (data) => this.restrictToVisibility(data))
if (this.adminSetWidget.isEmpty()) {
console.error("No data was passed from the admin set. Perhaps there are no selectable options?")
return
}
this.restrictToVisibility(this.adminSetWidget.data())
}
}
Expand Down

0 comments on commit d7c1250

Please sign in to comment.