prevent undefined access in non-sframe apps

pull/1/head
ansuz 7 years ago
parent d644054e3f
commit 1cbf1aec92

@ -526,7 +526,8 @@ define([
// them. // them.
var win; var win;
$('.tippy-popper').each(function (i, el) { $('.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) { if (win.$('[aria-describedby=' + el.getAttribute('id') + ']').length === 0) {
el.remove(); el.remove();
} }

Loading…
Cancel
Save