- Fix (Imagelib): Avoid premature exit for string API (#274)

This commit is contained in:
Brett Zamir
2018-09-25 23:34:51 +08:00
parent fff4b2e48b
commit 8c0161361f
2 changed files with 4 additions and 4 deletions

View File

@@ -266,7 +266,8 @@ var svgEditorExtension_imagelib = (function () {
$('#dialog_box').hide();
type = hasName ? 'meta' : response.charAt(0);
} catch (e) {
// This block is for backward compatibility (for IAN and Openclipart)
// This block is for backward compatibility (for IAN and Openclipart);
// should otherwise return
if (typeof response === 'string') {
var char1 = response.charAt(0);
@@ -282,7 +283,6 @@ var svgEditorExtension_imagelib = (function () {
type = response.charAt(0);
}
}
return;
}
var entry = void 0,

View File

@@ -106,7 +106,8 @@ export default {
? 'meta'
: response.charAt(0);
} catch (e) {
// This block is for backward compatibility (for IAN and Openclipart)
// This block is for backward compatibility (for IAN and Openclipart);
// should otherwise return
if (typeof response === 'string') {
const char1 = response.charAt(0);
@@ -122,7 +123,6 @@ export default {
type = response.charAt(0);
}
}
return;
}
let entry, curMeta, svgStr, imgStr;