fix: Use non-global flag whilst resolving regular expressions
v13.9.0 #8178
This commit is contained in:
parent
0d0ab7767c
commit
1e9b4c3775
@ -34,7 +34,7 @@ class DataResolver extends null {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
static resolveCode(data, regex) {
|
static resolveCode(data, regex) {
|
||||||
return data.matchAll(regex).next().value?.[1] ?? data;
|
return new RegExp(regex.source).exec(data)?.[1] ?? data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user