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

Commit 16314a5

Browse files
committed
jshint fixes
1 parent c390da4 commit 16314a5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/date.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ angular.module('ui.date', [])
5959
var date = controller.$modelValue;
6060
if ( angular.isDefined(date) && date !== null && !angular.isDate(date) ) {
6161
if ( angular.isString(controller.$modelValue) ) {
62-
date = uiDateConverter.stringToDate(attrs.uiDateFormat, controller.$modelValue)
62+
date = uiDateConverter.stringToDate(attrs.uiDateFormat, controller.$modelValue);
6363
} else {
6464
throw new Error('ng-Model value must be a Date, or a String object with a date formatter - currently it is a ' + typeof date + ' - use ui-date-format to convert it from a string');
6565
}
@@ -84,11 +84,6 @@ angular.module('ui.date', [])
8484
])
8585
.service('uiDateConverter', ['uiDateFormatConfig', function(uiDateFormatConfig){
8686

87-
return {
88-
stringToDate: stringToDate,
89-
dateToString: dateToString
90-
};
91-
9287
function dateToString(dateFormat, value){
9388
if (value) {
9489
if ( dateFormat || uiDateFormatConfig) {
@@ -111,6 +106,12 @@ angular.module('ui.date', [])
111106
}
112107
return null;
113108
}
109+
110+
return {
111+
stringToDate: stringToDate,
112+
dateToString: dateToString
113+
};
114+
114115
}])
115116
.constant('uiDateFormatConfig', '')
116117
.directive('uiDateFormat', ['uiDateConverter', function(uiDateConverter) {
@@ -125,7 +126,7 @@ angular.module('ui.date', [])
125126
});
126127

127128
modelCtrl.$parsers.push(function(value){
128-
return uiDateConverter.dateToString(dateFormat, value)
129+
return uiDateConverter.dateToString(dateFormat, value);
129130
});
130131

131132
}

0 commit comments

Comments
 (0)