We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题简述 如果当前键的 key pick 是 mock 的生成函数, 则不应该出现递归引用. 否则导致循环引用而导致崩溃: Maximum call stack size exceeded .
Maximum call stack size exceeded
{ "pick": " @pick(['a', 'b'])" }
复现步骤 点此 打开控制台粘贴以下代码:
s = Mock.mock({ "pick": "@pick(['a', 'b'])" }) console.log(s) // a s = Mock.mock({ "pick": " @pick(['a', 'b'])" }) console.log(s) // Maximum call stack size exceeded
期望结果
s = Mock.mock({ "pick": "@pick(['a', 'b'])" }) console.log(s) // a s = Mock.mock({ "pick": " @pick(['a', 'b'])" }) console.log(s) // a
环境
The text was updated successfully, but these errors were encountered:
先暂时使用 @PICK 代替解决,后续优化
@PICK
Sorry, something went wrong.
No branches or pull requests
问题简述
如果当前键的 key pick 是 mock 的生成函数, 则不应该出现递归引用. 否则导致循环引用而导致崩溃:
Maximum call stack size exceeded
.复现步骤
点此 打开控制台粘贴以下代码:
期望结果
环境
The text was updated successfully, but these errors were encountered: