From 9825b5b4a0ccab82d38c8daac8b5e85ab82ee84d Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Fri, 4 Dec 2020 20:02:05 +0100 Subject: [PATCH] Ensure new variables are strings (#5197) --- core/modules/widgets/eventcatcher.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/widgets/eventcatcher.js b/core/modules/widgets/eventcatcher.js index 09f2e3ad7..c014f8997 100644 --- a/core/modules/widgets/eventcatcher.js +++ b/core/modules/widgets/eventcatcher.js @@ -97,13 +97,13 @@ EventWidget.prototype.render = function(parent,nextSibling) { variables["event-mousebutton"] = "right"; } } - variables["event-type"] = event.type; + variables["event-type"] = event.type.toString(); if(typeof event.detail === "object" && !!event.detail) { $tw.utils.each(event.detail,function(detailValue,detail) { - variables["event-detail-" + detail] = detailValue; + variables["event-detail-" + detail] = detailValue.toString(); }); } else if(!!event.detail) { - variables["event-detail"] = event.detail; + variables["event-detail"] = event.detail.toString(); } self.invokeActionString(actions,self,event,variables); event.preventDefault(); @@ -153,4 +153,4 @@ EventWidget.prototype.refresh = function(changedTiddlers) { exports.eventcatcher = EventWidget; -})(); \ No newline at end of file +})();