fhemweb.js: fix scriptAttribute (used by codemirror) for script tag without src

attribute. Forum #20444



git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5841 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-05-13 08:06:07 +00:00
parent bf470f3e0f
commit 84144ed906

View File

@@ -346,7 +346,8 @@ scriptAttribute(sname)
{
var attr="";
$("head script").each(function(){
if($(this).attr("src").indexOf(sname) >= 0)
var attr = $(this).attr("src");
if(attr && attr.indexOf(sname) >= 0)
attr = $(this).attr("attr");
});