Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information