Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(datepicker): check if getter.assign is function
Browse files Browse the repository at this point in the history
Closes #3155, #3345, #3719
  • Loading branch information
Robin van Baalen committed May 28, 2015
1 parent 4683996 commit ed10899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
if ( key === 'datepickerMode' ) {
var setAttribute = getAttribute.assign;
scope.$watch('watchData.' + key, function(value, oldvalue) {
if ( value !== oldvalue ) {
if ( angular.isFunction(setAttribute) && value !== oldvalue ) {
setAttribute(scope.$parent, value);
}
});
Expand Down

0 comments on commit ed10899

Please sign in to comment.