Skip to content

Commit

Permalink
Merge pull request #348 from ReproNim/fix/regex
Browse files Browse the repository at this point in the history
fix: replace all occurrances of match in survey
  • Loading branch information
satra authored Oct 15, 2024
2 parents ba8ece5 + e9e4e58 commit 817f1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Survey/Survey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@
else if (!val && string.includes('includes')) { // if val is undefined and is supposed to be a list
val = `[]`;
}
output = output.replace(new RegExp(`\\b${k}\\b`), val);
output = output.replaceAll(new RegExp(`\\b${k}\\b`, 'g'), val);
} else {
output = output.replace(new RegExp(`\\b${k}\\b`), 0);
output = output.replaceAll(new RegExp(`\\b${k}\\b`, 'g'), 0);
}
});
// console.log(356, output);
Expand Down

0 comments on commit 817f1d7

Please sign in to comment.