Modals: don't crash if options.event is missing

Raised here:

https://groups.google.com/d/msgid/tiddlywiki/3E83D2D3-42B2-4AA1-A042-52AB1D7B9B15%40gmail.com
browser-messaging-saver
jeremy@jermolene.com 2021-02-13 10:28:31 +00:00
rodzic c0dc2669c0
commit 50d0b6ee50
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -31,7 +31,7 @@ Modal.prototype.display = function(title,options) {
options = options || {};
this.srcDocument = options.variables && (options.variables.rootwindow === "true" ||
options.variables.rootwindow === "yes") ? document :
(options.event.event && options.event.event.target ? options.event.event.target.ownerDocument : document);
(options.event && options.event.event && options.event.event.target ? options.event.event.target.ownerDocument : document);
this.srcWindow = this.srcDocument.defaultView;
var self = this,
refreshHandler,