Permalink
Browse files

IE <= 8 doesn't support Date.now(). Fixes #1258.

  • Loading branch information...
1 parent 1336453 commit 0b27e07bfe16d9d62b4f361963ba9cfa4ce7ab3a @blueimp committed May 2, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 js/jquery.fileupload.js
View
6 js/jquery.fileupload.js
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload Plugin 5.11
+ * jQuery File Upload Plugin 5.11.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -185,7 +185,7 @@
],
_BitrateTimer: function () {
- this.timestamp = Date.now();
+ this.timestamp = +(new Date());
this.loaded = 0;
this.bitrate = 0;
this.getBitrate = function (now, loaded, interval) {
@@ -231,7 +231,7 @@
_onProgress: function (e, data) {
if (e.lengthComputable) {
- var now = Date.now(),
+ var now = +(new Date()),
total,
loaded;
if (data._time && data.progressInterval &&

0 comments on commit 0b27e07

Please sign in to comment.