Bring back Safari compat

This commit is contained in:
garronej
2021-11-10 19:48:18 +01:00
parent 6603ac4389
commit 604655c02d

View File

@ -27,8 +27,9 @@ function resolveMsg<Key extends string, DoRenderMarkdown extends boolean>(props:
str = (() => {
const startIndex = str
.match(/(?<={)[0-9]+(?=})/g)
?.map(g => parseInt(g))
.match(/{[0-9]+}/g)
?.map(g => g.match(/{([0-9]+)}/)![1])
.map(indexStr => parseInt(indexStr))
.sort((a, b) => a - b)[0];
if (startIndex === undefined) {