Skip to content

Commit 817f1d7

Browse files
authored
Merge pull request #348 from ReproNim/fix/regex
fix: replace all occurrances of match in survey
2 parents ba8ece5 + e9e4e58 commit 817f1d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Survey/Survey.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@
339339
else if (!val && string.includes('includes')) { // if val is undefined and is supposed to be a list
340340
val = `[]`;
341341
}
342-
output = output.replace(new RegExp(`\\b${k}\\b`), val);
342+
output = output.replaceAll(new RegExp(`\\b${k}\\b`, 'g'), val);
343343
} else {
344-
output = output.replace(new RegExp(`\\b${k}\\b`), 0);
344+
output = output.replaceAll(new RegExp(`\\b${k}\\b`, 'g'), 0);
345345
}
346346
});
347347
// console.log(356, output);

0 commit comments

Comments
 (0)