Skip to content

Commit

Permalink
fix: always use /g in replaceAll using regexes
Browse files Browse the repository at this point in the history
Fixes game/#2104
This was because of a unicorn linter rule that got added and me subsequently ballsing up the refactor to appease it.
  • Loading branch information
tsa96 authored and Gocnak committed Oct 15, 2023
1 parent 31fda5f commit aba4f39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pages/settings/speedometer.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class RangeColorObject {

static convertCSSToKV(color) {
const kvColor = color
.replaceAll(/[^\d,|]/, '')
.replaceAll(/[^\d,|]/g, '')
.split(',')
.map((x) => Number.parseInt(x));
kvColor[3] *= 255;
Expand Down

0 comments on commit aba4f39

Please sign in to comment.