prevent undefined access in non-sframe apps

This commit is contained in:
ansuz 2017-10-27 14:14:19 +02:00
parent d644054e3f
commit 1cbf1aec92
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}