Skip to content

Commit ed10899

Browse files
author
Robin van Baalen
committed
fix(datepicker): check if getter.assign is function
Closes angular-ui#3155, angular-ui#3345, angular-ui#3719
1 parent 4683996 commit ed10899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datepicker/datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
558558
if ( key === 'datepickerMode' ) {
559559
var setAttribute = getAttribute.assign;
560560
scope.$watch('watchData.' + key, function(value, oldvalue) {
561-
if ( value !== oldvalue ) {
561+
if ( angular.isFunction(setAttribute) && value !== oldvalue ) {
562562
setAttribute(scope.$parent, value);
563563
}
564564
});

0 commit comments

Comments
 (0)