You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
When selecting the empty value <option value=""></option> on a <select multiple="multiple" ng-options="v.label for(k,v) in options"> a type error is thrown.
TypeError: Cannot read property 'disabled' of undefined
at angular.min.js:272
at m (angular.min.js:7)
at u.readValue (angular.min.js:272)
at angular.min.js:285
at n.$eval (angular.min.js:134)
at n.$apply (angular.min.js:135)
at HTMLSelectElement.<anonymous> (angular.min.js:285)
at HTMLSelectElement.Gf.c (angular.min.js:35)
Fix:
Replace
if (!option.disabled) selections.push(options.getViewValueFromOption(option));
with
if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));
When selecting the empty value
<option value=""></option>
on a<select multiple="multiple" ng-options="v.label for(k,v) in options">
a type error is thrown.OS/Browser: All
Version: Angular 1.4.3
Fiddle: https://jsfiddle.net/HB7LU/16138/
Code:
angular.js/src/ng/directive/ngOptions.js
Line 529 in 14638f4
Stack Trace:
Fix:
Replace
if (!option.disabled) selections.push(options.getViewValueFromOption(option));
with
if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));
same as in Line 517.
The text was updated successfully, but these errors were encountered: