Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Dec 16, 2022
1 parent dc38b52 commit 481ed62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scriptlets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}'`);
}
Expand Down

0 comments on commit 481ed62

Please sign in to comment.