Skip to content

fix: guard trimStart call in analyseImport against null names (#170)#181

Merged
JuliaKalder merged 2 commits into
mainfrom
fix/issue-170
Jun 3, 2026
Merged

fix: guard trimStart call in analyseImport against null names (#170)#181
JuliaKalder merged 2 commits into
mainfrom
fix/issue-170

Conversation

@JuliaKalder

Copy link
Copy Markdown
Owner

Summary

Guard trimStart call against null/missing template names in analyseImport().

Changes

  • validation.js: Changed t.name.trim() to (t.name || "").trim() to handle null/undefined names in two places: the seenNames Map initialization and the import loop key generation.

Testing

All 96 tests pass.

Fixes #170

JuliBot and others added 2 commits May 15, 2026 11:22
Guard t.name with null-coalescing (t.name || "") before calling
toLowerCase() and trim() in analyseImport() to prevent TypeError when
existing templates have null or undefined names.

Fixes #170
@JuliaKalder
JuliaKalder merged commit aa45d4b into main Jun 3, 2026
2 checks passed
@JuliaKalder
JuliaKalder deleted the fix/issue-170 branch June 3, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MEDIUM] analyseImport (validation.js:55) crashes with TypeError on existing templates with null/missing names

1 participant