Bring back Safari compat
This commit is contained in:
@ -27,8 +27,9 @@ function resolveMsg<Key extends string, DoRenderMarkdown extends boolean>(props:
|
|||||||
|
|
||||||
str = (() => {
|
str = (() => {
|
||||||
const startIndex = str
|
const startIndex = str
|
||||||
.match(/(?<={)[0-9]+(?=})/g)
|
.match(/{[0-9]+}/g)
|
||||||
?.map(g => parseInt(g))
|
?.map(g => g.match(/{([0-9]+)}/)![1])
|
||||||
|
.map(indexStr => parseInt(indexStr))
|
||||||
.sort((a, b) => a - b)[0];
|
.sort((a, b) => a - b)[0];
|
||||||
|
|
||||||
if (startIndex === undefined) {
|
if (startIndex === undefined) {
|
||||||
|
Reference in New Issue
Block a user