2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

svg.js: check for missing embed source (Forum #80322)

git-svn-id: https://svn.fhem.de/fhem/trunk@15523 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-11-29 22:04:35 +00:00
parent c9053ddb9b
commit 5545aae5cb

View File

@ -352,7 +352,7 @@ svg_init(par) // also called directly from perl, in race condition
var e = this; var e = this;
var src = $(e).attr("src"); var src = $(e).attr("src");
var ed = FW_getSVG(e); var ed = FW_getSVG(e);
if(src.indexOf("SVG_showLog") < 0 || !ed) if(!src || src.indexOf("SVG_showLog") < 0 || !ed)
return; return;
var sTag = $("svg", ed)[0]; // "not well-formed" warning in FireFox var sTag = $("svg", ed)[0]; // "not well-formed" warning in FireFox
if((par && $(sTag).attr("id") != par)) if((par && $(sTag).attr("id") != par))