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

Commit

Permalink
fix(datepicker): ensure initDate is on an object
Browse files Browse the repository at this point in the history
- Check if `options` is an object to avoid error at `initDate` check

Closes #3625
  • Loading branch information
kreigiron authored and wesleycho committed Jul 31, 2015
1 parent 811bf96 commit 577b2a2
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 @@ -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;
Expand Down

0 comments on commit 577b2a2

Please sign in to comment.