This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Select elements bound to a scope property with a value of null will add an extra option #11872
Labels
Milestone
On upgrading from angular 1.2.23 to 1.3.15 I noticed a bug when
select
elements are bound usingng-model
to a scope property which is predefined asnull
. These elements render an additionaloption
elements which looks like<option value="? object:null ?"></option>
, the result of this as an extra blank option on the dropdown.The following code sample demonstrates the problem by comparing a select bound to a null property with a select bound to an undefined property.
I've tested this with 1.4.0-rc.2 and the problem still exists.
I believe the fix should be to treat null properties the same as undefined.
The text was updated successfully, but these errors were encountered: