Closed smap closed 10 years ago
I can't reproduce this with your plunkr. I tried with Chrome 36 and Safari 7 on OSX.
Can you give any more details on how to reproduce it?
Windows 7 Chrome 36.0.1985.125 m
TypeError: Cannot read property 'value' of undefined
at http://run.plnkr.co/BvoPpxCLPDHrHO10/angular-selectize-1.3.0.js:211:71
at Array.map (native)
at getSelectedItems (http://run.plnkr.co/BvoPpxCLPDHrHO10/angular-selectize-1.3.0.js:211:26)
at http://run.plnkr.co/BvoPpxCLPDHrHO10/angular-selectize-1.3.0.js:121:35
at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js:111:59
at e (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js:33:82)
at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js:36:251
Windows 7 Firefox 31.0 + Firebug 2.0.2
Error: selectize.options[i] is undefined getSelectedItems/<@http://run.plnkr.co/RqPhg9Rn1jgDpanL
/angular-selectize-1.3.0.js:211:44 getSelectedItems@http://run.plnkr.co/RqPhg9Rn1jgDpanL
/angular-selectize-1.3.0.js:211:13 scheduleUpdate/updateTimer<@http://run.plnkr.co
/RqPhg9Rn1jgDpanL/angular-selectize-1.3.0.js:121:19 e/h<@http://ajax.googleapis.com/ajax/libs
/angularjs/1.2.5/angular.min.js:111:49 e@http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5
/angular.min.js:33:80 dd/h.defer/c<@http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5
/angular.min.js:36:251
Windows 7 Internet Explorer 11.0.9600.17207
TypeError: Не удалось получить свойство "value" ссылки, значение которой не определено или является NULL
at Anonymous function (http://run.plnkr.co/tHGuHSuFYf4VYA4y/angular-selectize-1.3.0.js:211:44)
at getSelectedItems (http://run.plnkr.co/tHGuHSuFYf4VYA4y/angular-selectize-1.3.0.js:211:13)
at Anonymous function (http://run.plnkr.co/tHGuHSuFYf4VYA4y/angular-selectize-1.3.0.js:121:15)
at Anonymous function (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js:111:49)
at e (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js:33:80)
at Anonymous function (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js:36:251)
@smap Thanks for submitting the issue!
@z3roshot Clearing the selectize control results in a call to getSelectedItems
with an empty string, causing the TypeError
. I updated the issue title.
@smap We released 1.3.1
to Bower with the fix for this issue.
Example: http://plnkr.co/edit/0LITR4hATIlt8Hz0dcq7
You can do: