diff --git a/src/scriptlets/index.js b/src/scriptlets/index.js index c2ca22f7..c3d618e8 100644 --- a/src/scriptlets/index.js +++ b/src/scriptlets/index.js @@ -37,6 +37,8 @@ function getScriptletCode(source) { } const scriptletFunction = getScriptletFunction(source.name); + // In case isValidScriptletName check will pass invalid scriptlet name, + // for example when there is a bad alias if (typeof scriptletFunction !== 'function') { throw new Error(`Error: cannot invoke scriptlet with name: '${source.name}'`); }