mirror of https://github.com/xwiki-labs/cryptpad
prevent undefined access in non-sframe apps
This commit is contained in:
parent
d644054e3f
commit
1cbf1aec92
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue