diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2014-06-19 12:01:49 +0200 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2014-06-19 12:01:49 +0200 |
commit | 8c66b72dd479bad18be7571cb97f8b09cc65488c (patch) | |
tree | ddc992981c91e78a32115d659d577b016653290e /lib/scripts | |
parent | d96ca44fc9a1ee346cfda97d7a66b8d7716e6031 (diff) | |
download | rpg-8c66b72dd479bad18be7571cb97f8b09cc65488c.tar.gz rpg-8c66b72dd479bad18be7571cb97f8b09cc65488c.tar.bz2 |
fix IE upload when Array prototype has been modified
The edittable plugin broke uploading in IE8 (and maybe others) because
the Handsontable script adds a function to the Array prototype and the
uploading script did not properly check that.
Diffstat (limited to 'lib/scripts')
-rw-r--r-- | lib/scripts/fileuploader.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/scripts/fileuploader.js b/lib/scripts/fileuploader.js index e75b8d3a5..d6278950b 100644 --- a/lib/scripts/fileuploader.js +++ b/lib/scripts/fileuploader.js @@ -226,7 +226,9 @@ qq.obj2url = function(obj, temp, prefixDone){ } else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){ // for anything else but a scalar, we will use for-in-loop for (var i in obj){ - add(obj[i], i); + if(obj.hasOwnProperty(i) && typeof obj[i] != 'function') { + add(obj[i], i); + } } } else { uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj)); |