From 577b2a2ace586ed42ed2ce4f3658efb396b6ec41 Mon Sep 17 00:00:00 2001 From: Erik Giron Date: Tue, 5 May 2015 15:16:40 -0600 Subject: [PATCH] fix(datepicker): ensure `initDate` is on an object - Check if `options` is an object to avoid error at `initDate` check Closes #3625 --- 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 99acc7a87d..7fc5cc3ab4 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -549,7 +549,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi if ( attrs.datepickerOptions ) { var options = scope.$parent.$eval(attrs.datepickerOptions); - if(options.initDate) { + if(options && options.initDate) { scope.initDate = options.initDate; datepickerEl.attr( 'init-date', 'initDate' ); delete options.initDate;