Skip to content

Commit

Permalink
Merge pull request #5 from coqsenpate/cannotReadPropertiesOfUndefinedFix
Browse files Browse the repository at this point in the history
Fixed "Cannot read properties of undefined (reading 'call')" error.
  • Loading branch information
Inqnuam authored Jan 30, 2024
2 parents 2093a07 + 79cbbff commit 3dae7e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ let foundHelpers: string[] = [];
const fileCache = new Map();
// @ts-ignore
class ESBuildHandlebarsJSCompiler extends handlebars.JavaScriptCompiler {
// @ts-ignore
constructor() {
super(...arguments);
}
public compiler: typeof ESBuildHandlebarsJSCompiler = ESBuildHandlebarsJSCompiler;
nameLookup(parent, name: string, type) {
if (type === "helper" && !foundHelpers.includes(name)) {
foundHelpers.push(name);
Expand Down

0 comments on commit 3dae7e2

Please sign in to comment.