This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($observe): check if the attribute is undefined
Check if the attribute is undefined before manually applying the function because if not an undefined property is added to the scope of the form controller when the input control does not have a name. Closes #9707 Closes #9720
- Loading branch information
1 parent
d488a89
commit 531a8de
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: If anyone was using
attrs.$observe()
with an optional attribute (and perhaps using it to set a default value), the handler will no longer execute, which may break your app. If you need the handler to execute, I recommend setting a default value (attrs.foo = attrs.foo || 'foo'
) prior to calling$observe
.