Browse Source

Merge pull request #444 from ProjectPatatoe/fix-image

replace broken .text() in jquery in firefox. Console to show exception by @ProjectPatatoe
pull/445/head
Dan 4 years ago
committed by GitHub
parent
commit
34e0058c23
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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