我们的应用程序中有一个来自Crisp (实时聊天)的错误,它说:
警告Crisp发现了一些本机JavaScript方法。这会改变chatbox的行为并破坏一些东西。确保不覆盖列出的函数,以确保chatbox按预期工作。您可能会在此页面上寻找其他正在使用的JavaScript库。
您可以通过将:$crisp.push(“安全”,真)添加到页面JavaScript中来禁用此警告。
Methods to check: Object.prototype.toString
{
arguments: [
[WARNING] Crisp found shims of native JavaScript methods. This can alter the
chatbox behavior and break things. Make sure not to override listed functions
to ensure your chatbox works as expected. You may be looking for other
JavaScript libraries in use on this page.
You can disable this warning by adding: $crisp.push(["safe", true]) to your
page JavaScript.
Methods to check:
[
Object.prototype.toString
]
],
logger: console
}
Crisp用于使用Crisp开发的项目(版本12)。
有人面临这个问题吗?有解决办法吗?
顺便说一下,我们不想禁用警告。
提前谢谢你,祝你一天/晚上愉快!
发布于 2022-08-06 14:58:31
显然,您的项目代码或某些依赖项正在使用本机toString()方法。
在我的例子中,当我们使用Array()时,它对我们大喊大叫。我们也不想移除来自克里斯普的任何警告。
[WARNING] Crisp found shims of native JavaScript methods. This can alter the chatbox behavior and break things. Make sure not to override listed functions to ensure your chatbox works as expected. You may be looking for other JavaScript libraries in use on this page.
You can disable this warning by adding: $crisp.push(["safe", true]) to your page JavaScript.
Methods to check: Array(1)
如果在代码库中找到了上述方法,只需将其更改为其他方法即可。但是如果你真的需要它,你就无能为力了。只要该方法不干扰Crisp函数,我认为只需就可以忽略警告
https://stackoverflow.com/questions/73033062
复制相似问题