From 8ecb2cfcec9edffda03d1b0240c7ca11f68837df Mon Sep 17 00:00:00 2001 From: Benjamin F Date: Sun, 7 May 2023 13:51:59 -0700 Subject: [PATCH] fix(core): (part) Allow existing unknown macro test to pass --- packages/core/src/part.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/part.mjs b/packages/core/src/part.mjs index e1d28495bef..ff6b1ef56d3 100644 --- a/packages/core/src/part.mjs +++ b/packages/core/src/part.mjs @@ -345,7 +345,8 @@ Part.prototype.__macroClosure = function (props) { const method = function (key, args) { const macro = utils.__macroName(key) if (typeof self[macro] === 'function') self[macro](args, props) - else self.context.store.log.warning('Unknown macro `' + key + '` used in ' + self.name) + else if ('context' in self) + self.context.store.log.warning('Unknown macro `' + key + '` used in ' + self.name) } return method