Commit 50c0c15
committed
Fixed IQ Puzzles statuses resetting on update
If `match` is called with a global RegExp, capturing groups are not
included in the return value:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match#return_value.
As such:
> If you want to obtain capture groups and the global flag is set, you
> need to use `RegExp.prototype.exec()` or `String.prototype.matchAll()`
> instead.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match#description
So, since we need only one image, we can safely use `matchAll`, and then
only look at the first element.
(introduced by 53ba184)1 parent 53ba184 commit 50c0c15
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
0 commit comments