Update SVGExport.js

Check for `'null'` before setting custom paper data attribute, because `JSON.stringify()` returns `"null"` (as a String object) if the argument is null.
This commit is contained in:
Jan 2015-02-13 12:10:47 +01:00
parent c5ced798e8
commit 1d8c662c98

View file

@ -387,7 +387,7 @@ new function() {
if (onExport)
node = onExport(item, node, options) || node;
var data = JSON.stringify(item._data);
if (data && data !== '{}' && data != 'null')
if (data && data !== '{}' && data !== 'null')
node.setAttribute('data-paper-data', data);
}
return node && applyStyle(item, node, isRoot);