当我运行React Native应用程序时,出现了奇怪的错误:
一些示例代码:
const { url } = <incoming object>;
const reURL = <my regex>;
console.debug('url:', url);
console.debug('typeof url:', typeof url);
matches = [...url.matchAll(reURL)];
日志输出:
url: <as expected>
typeof url: string
错误信息:
TypeError: url.matchAll is not a function. (In 'url.matchAll(reURL)', 'url.matchAll' is undefined)
iOS 上一切正常,错误只会在 Android 上发生。
环境非常新,几天前更新了所有 npm
包。
有人知道从哪里开始寻找解决方案吗?