angular-ui/ui-select — pull request #249 by blenaerts (2014-10-01 10:50:28+00:00)
Title: ctrl.selected added to check where it's undefined

When you have arrays coupled to ng-model that are null or undefined, you get errors when using ctrl.selected that also is undefined.

Added an extra check in the if-statements to be sure that ctrl.selected isn't null or undefined.