Skip to content

Commit 6f222ca

Browse files
committed
Fix ie8 bug
String.trim() is not supported in ie8, replaced with String.replace(/^\s+|\s+$/g, '')
1 parent fe02c9c commit 6f222ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/datetime/strtotime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function strtotime (text, now) {
2828
}
2929

3030
// Unecessary spaces
31-
text = text.trim()
31+
text = text.replace(/^\s+|\s+$/g, '')
3232
.replace(/\s{2,}/g, ' ')
3333
.replace(/[\t\r\n]/g, '')
3434
.toLowerCase();

0 commit comments

Comments
 (0)