1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

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
This commit is contained in:
jeremy@jermolene.com 2021-02-13 10:28:31 +00:00
parent c0dc2669c0
commit 50d0b6ee50

View File

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