From 50d0b6ee50689fd7ed8d7e8cc7ac4ea285da36d9 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sat, 13 Feb 2021 10:28:31 +0000 Subject: [PATCH] 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 --- core/modules/utils/dom/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index 561dbf298..db66b1abc 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -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,