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

Commit 577b2a2

Browse files
kreigironwesleycho
authored andcommitted
fix(datepicker): ensure initDate is on an object
- Check if `options` is an object to avoid error at `initDate` check Closes #3625
1 parent 811bf96 commit 577b2a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/datepicker/datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
549549

550550
if ( attrs.datepickerOptions ) {
551551
var options = scope.$parent.$eval(attrs.datepickerOptions);
552-
if(options.initDate) {
552+
if(options && options.initDate) {
553553
scope.initDate = options.initDate;
554554
datepickerEl.attr( 'init-date', 'initDate' );
555555
delete options.initDate;

0 commit comments

Comments
 (0)