imevro / ng-selectize

AngularJS directive for Selectize.js
39 stars 10 forks source link

Cannot read property 'value' of undefined #5

Open voronind opened 9 years ago

voronind commented 9 years ago

On init multiselect input I got that. It's setSelectizeOptions(newOptions) where newOptions is undefined.

TypeError: Cannot read property 'value' of undefined
    at a.extend.registerOption (https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/standalone/selectize.min.js:2:24727)
    at a.extend.addOption (https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/standalone/selectize.min.js:2:24603)
    at setSelectizeOptions (http://localhost:8003/static/musicbit/js/ng-selectize-0.0.6.js:116:21)
    at angular.module.directive.link (http://localhost:8003/static/musicbit/js/ng-selectize-0.0.6.js:127:36)
    at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js:70:222
    at Xc (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js:70:279)
    at x (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js:59:323)
    at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js:51:409)
    at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js:51:426)
    at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js:51:426) <input type="text" selectize="tagsConfig" options="tagOptions" ng-model="tags" class="ng-pristine ng-untouched ng-valid ng-isolate-scope selectized" tabindex="-1" value="" style="display: none;">
angular.js:11707TypeError: Cannot read property 'value' of undefined
    at a.extend.registerOption (selectize.min.js:2)
    at a.extend.addOption (selectize.min.js:2)
    at Object.setSelectizeOptions (ng-selectize-0.0.6.js:116)
    at Object.ng.config.$provide.decorator.$delegate.__proto__.$watch.applyFunction [as fn] (<anonymous>:778:50)
    at m.$get.m.$digest (angular.js:14397)
    at m.ng.config.$provide.decorator.$delegate.__proto__.$digest (<anonymous>:844:31)
    at m.$get.m.$apply (angular.js:14660)
    at m.ng.config.$provide.decorator.$delegate.__proto__.$apply (<anonymous>:855:30)
    at angular.js:1458
    at Object.e [as invoke] (angular.js:4219)
yakovkhalinsky commented 9 years ago

Thanks for the report I will check this out :+1: