From 481ed62304bae9be28168f5b5137278cfbad4869 Mon Sep 17 00:00:00 2001 From: Stanislav A Date: Fri, 16 Dec 2022 21:57:14 +0300 Subject: [PATCH] add comment --- src/scriptlets/index.js | 2 ++ 1 file changed, 2 insertions(+) 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}'`); }