From 71ac4e7cacadd735dc66c78b73abab9107b75bc4 Mon Sep 17 00:00:00 2001 From: Robin van Baalen Date: Wed, 27 May 2015 12:42:14 -0400 Subject: [PATCH] fix(datepicker): check if getter.assign is function Closes #3155, #3345 --- src/datepicker/datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index 3cbbfe9809..a98b48dc7e 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -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); } });