Skip to content

Commit f105d41

Browse files
committed
fixes angular#2275
if "offset" is not specified, it messes up the calculations that follow. Apparently, it does not default to 0 in arithmetic context on some older browsers.
1 parent 85c31e0 commit f105d41

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ng/filter/filters.js

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ function padNumber(num, digits, trim) {
192192

193193

194194
function dateGetter(name, size, offset, trim) {
195+
if (!offset) { offset = 0; }
195196
return function(date) {
196197
var value = date['get' + name]();
197198
if (offset > 0 || value > -offset)

0 commit comments

Comments
 (0)