diff --git a/src/svg/SVGImport.js b/src/svg/SVGImport.js index 45e9d39d..94b06f9e 100644 --- a/src/svg/SVGImport.js +++ b/src/svg/SVGImport.js @@ -490,29 +490,48 @@ new function() { return match && definitions[match[1]]; } - function importSVG(node, isRoot, options) { - if (!options) + function importSVG(source, isRoot, options) { + if (!source) + return null; + if (!options) { options = {}; - if (typeof node === 'string') { - // Check if the string does not represent SVG data, in which case - // it must be a url of a SVG to be loaded. - if (isRoot && node && !/^.*