From 1cbf1aec92cdc202e4cd83f8e4adedc448afdbab Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 27 Oct 2017 14:14:19 +0200 Subject: [PATCH] prevent undefined access in non-sframe apps --- www/common/common-interface.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 644efded2..f03b4b481 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -526,7 +526,8 @@ define([ // them. var win; $('.tippy-popper').each(function (i, el) { - win = win || $('#pad-iframe')[0].contentWindow; + win = win || $('#pad-iframe').length? $('#pad-iframe')[0].contentWindow: undefined; + if (!win) { return; } if (win.$('[aria-describedby=' + el.getAttribute('id') + ']').length === 0) { el.remove(); }