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

Commit

Permalink
chore(datepicker): fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleycho committed Jan 15, 2016
1 parent b76e98e commit bcaa221
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,17 +600,17 @@ function(scope, element, attrs, $compile, $parse, $document, $rootScope, $positi
} else {
dateFormat = attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup;
attrs.$observe('uibDatepickerPopup', function(value, oldValue) {
var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
// Invalidate the $modelValue to ensure that formatters re-run
// FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
if (newDateFormat !== dateFormat) {
dateFormat = newDateFormat;
ngModel.$modelValue = null;

if (!dateFormat) {
throw new Error('uibDatepickerPopup must have a date format specified.');
}
var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
// Invalidate the $modelValue to ensure that formatters re-run
// FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
if (newDateFormat !== dateFormat) {
dateFormat = newDateFormat;
ngModel.$modelValue = null;

if (!dateFormat) {
throw new Error('uibDatepickerPopup must have a date format specified.');
}
}
});
}

Expand Down

0 comments on commit bcaa221

Please sign in to comment.