1
0
Fork 0

fix(core): (part) Allow existing unknown macro test to pass

This commit is contained in:
Benjamin F 2023-05-07 13:51:59 -07:00
parent b46d3ac67e
commit 8ecb2cfcec

View file

@ -345,7 +345,8 @@ Part.prototype.__macroClosure = function (props) {
const method = function (key, args) { const method = function (key, args) {
const macro = utils.__macroName(key) const macro = utils.__macroName(key)
if (typeof self[macro] === 'function') self[macro](args, props) 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 return method