Fixed a few bugs where incorrect var names were used

This commit is contained in:
Amir Shrestha
2018-08-23 17:22:41 -04:00
parent 39f0273c30
commit b409e6e2dd
+5 -5
View File
@@ -21,7 +21,7 @@
global.URL = global.URL || global.webkitURL || function(href, a) { global.URL = global.URL || global.webkitURL || function(href, a) {
a = document.createElement('a') a = document.createElement('a')
a.href = uri a.href = href
return a return a
} }
@@ -265,7 +265,7 @@
/********************************************************/ /********************************************************/
function File(chunks, name, opts) { function File(chunks, name, opts) {
opts = opts || {} opts = opts || {}
a = Blob.call(this, chunks, opts) || this var a = Blob.call(this, chunks, opts) || this
a.name = name a.name = name
a.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date a.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date
a.lastModified = +a.lastModifiedDate a.lastModified = +a.lastModifiedDate
@@ -306,7 +306,7 @@
function _read(fr, blob, kind) { function _read(fr, blob, kind) {
if (!(blob instanceof Blob)) if (!(blob instanceof Blob))
throw new TypeError("Failed to execute '" + type + "' on 'FileReader': parameter 1 is not of type 'Blob'.") throw new TypeError("Failed to execute '" + kind + "' on 'FileReader': parameter 1 is not of type 'Blob'.")
fr.result = '' fr.result = ''
@@ -433,8 +433,8 @@
return '[object File]' return '[object File]'
} }
if (stringTag) if (strTag)
blob[stringTag] = 'File' blob[strTag] = 'File'
return blob return blob
} }