Skip to content
New issue

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

Model 中复制 datasource 有 bug #173

Open
yibuyisheng opened this issue Jun 1, 2016 · 0 comments
Open

Model 中复制 datasource 有 bug #173

yibuyisheng opened this issue Jun 1, 2016 · 0 comments

Comments

@yibuyisheng
Copy link
Member

这一行代码:https://github.com/ecomfe/er/blob/master/src/Model.js#L203 ,在支持 Object.create 的浏览器中会使用 Object.create,但是 Object.create(datasource) 会把 datasource 放到创建出来的新 Object 的 proto 上面去,所以效果并不等价于 u.clone ,如下截图:

image

image

后续再遇到 u.deepClone 之类的就崩溃了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant