From 4ec161aedbb44d6da48a6596ff57ea894741110b Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 13 May 2014 08:06:07 +0000 Subject: [PATCH] fhemweb.js: fix scriptAttribute (used by codemirror) for script tag without src attribute. Forum #20444 git-svn-id: https://svn.fhem.de/fhem/trunk@5841 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 3baff83d0..24bce4f18 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -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"); });