Browse Source

replace broken .text() in jquery in firefox. Console to show exception

pull/444/head
ProjectPatatoe 4 years ago
parent
commit
16aa9523a6
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      system/admin/editor/js/jquery.ajaxfileupload.js

+ 2
- 1
system/admin/editor/js/jquery.ajaxfileupload.js View File

@ -107,11 +107,12 @@
// and clean up after ourselves. // and clean up after ourselves.
*/ */
var handleResponse = function(loadedFrame, element) { var handleResponse = function(loadedFrame, element) {
var response, responseStr = $(loadedFrame).contents().text();
var response, responseStr = $(loadedFrame).contents()[0].body.textContent;
try { try {
//response = $.parseJSON($.trim(responseStr)); //response = $.parseJSON($.trim(responseStr));
response = JSON.parse(responseStr); response = JSON.parse(responseStr);
} catch(e) { } catch(e) {
console.error(e);
response = responseStr; response = responseStr;
} }


Loading…
Cancel
Save