fixed problem when xml tag in svg file is missing.

This commit is contained in:
make-ing 2016-06-17 12:02:56 +02:00
parent 3bbdd702db
commit 25be52587e

View file

@ -236,7 +236,11 @@ $(function(){
var url = self._getSVGserveUrl(file); var url = self._getSVGserveUrl(file);
callback = function (f) { callback = function (f) {
var newSvgAttrs = {}; var newSvgAttrs = {};
var root_attrs = f.select('svg').node.attributes; if(f.select('svg') == null){
root_attrs = f.node.attributes;
} else {
var root_attrs = f.select('svg').node.attributes;
}
var doc_width = null; var doc_width = null;
var doc_height = null; var doc_height = null;
var doc_viewbox = null; var doc_viewbox = null;