mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-03 11:34:41 +00:00
add callback with null argument to failed xml load (#2994)
This commit is contained in:
parent
f425966162
commit
489230bdf5
1 changed files with 2 additions and 2 deletions
|
|
@ -981,7 +981,7 @@
|
|||
xml.loadXML(r.responseText.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i, ''));
|
||||
}
|
||||
if (!xml || !xml.documentElement) {
|
||||
return;
|
||||
callback && callback(null);
|
||||
}
|
||||
|
||||
fabric.parseSVGDocument(xml.documentElement, function (results, options) {
|
||||
|
|
@ -989,7 +989,7 @@
|
|||
objects: fabric.util.array.invoke(results, 'toObject'),
|
||||
options: options
|
||||
});
|
||||
callback(results, options);
|
||||
callback && callback(results, options);
|
||||
}, reviver);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue