Skip to content

Commit

Permalink
check id val first
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhauck committed Sep 9, 2024
1 parent 696e578 commit c66a98f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/creator/src/createItemTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export function _templatizeResources(
results.forEach((isValid, i) => {
if (isValid) {
const id: string = idLookup[i];
if (verifiedIds.indexOf(id) < 0 && id) {
if (id && verifiedIds.indexOf(id) < 0) {
// templatize the itemId--but only once per unique id
const regEx = new RegExp(id, "gm");
dataString = dataString.replace(regEx, "{{" + id + ".itemId}}");
Expand Down

0 comments on commit c66a98f

Please sign in to comment.