From 9d1fca07103652cedeeace9020b8d939d046b631 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 2 Aug 2016 12:15:46 +0200 Subject: [PATCH] Make sure html property of html object in egw_seperateJavascript is type of string --- api/js/jsapi/jsapi.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/js/jsapi/jsapi.js b/api/js/jsapi/jsapi.js index 9e2e4ef95e..29ddc06f29 100644 --- a/api/js/jsapi/jsapi.js +++ b/api/js/jsapi/jsapi.js @@ -60,12 +60,16 @@ if (typeof window.console == 'undefined') /** * Seperates all script tags from the given html code and returns the seperately - * @param object _html object that the html code from which the script should be seperated. The html code has to be stored in _html.html, the result js will be written to _html.js + * + * @param object _html object that the html code + * from which the script should be seperated + * The html code has to be stored in _html.html, + * the result js will be written to _html.js. */ egw_seperateJavaScript = function(_html) { - var html = _html.html; + var html = typeof _html.html == 'string'?_html.html:''; var in_pos = html.search(/