From f1b67e415905d0fd7b4fb9364507a5be8396f2b6 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 30 Sep 2015 11:24:16 +0100 Subject: [PATCH] Update svgcanvas.js Changed docs and return value to match if unsuccessful --- editor/svgcanvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index babfa1b8..0b7d60a8 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -4959,7 +4959,7 @@ this.setSvgString = function(xmlString) { // xmlString - The SVG as XML text. // // Returns: -// This function returns false if the import was unsuccessful, true otherwise. +// This function returns null if the import was unsuccessful, or the element otherwise. // TODO: // * properly handle if namespace is introduced by imported content (must add to svgcontent // and update all prefixes in the imported node) @@ -5080,7 +5080,7 @@ this.importSvgString = function(xmlString) { } catch(e) { console.log(e); - return false; + return null; } // we want to return the element so we can automatically select it