From 5e6572142049cc67540bb89aaa406608d5b6f99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Desmedt?= <34781168+DesignThinkerer@users.noreply.github.com> Date: Wed, 12 Feb 2025 23:24:26 +0100 Subject: [PATCH] second attempt to fix the type issue --- core/modules/macros/now.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/macros/now.js b/core/modules/macros/now.js index 625f9024a..ec7b9acbc 100644 --- a/core/modules/macros/now.js +++ b/core/modules/macros/now.js @@ -26,7 +26,10 @@ exports.params = [ Run the macro */ exports.run = function(format) { - return String($tw.utils.formatDateString(new Date(),format || "0hh:0mm, DDth MMM YYYY")); + let formatString = format || "0hh:0mm, DDth MMM YYYY"; + formatString = String(formatString); + + return $tw.utils.formatDateString(new Date(), formatString); }; })();