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

关于lib\compile\adapter\extend.js #483

Closed
ugrg opened this issue Oct 13, 2017 · 2 comments
Closed

关于lib\compile\adapter\extend.js #483

ugrg opened this issue Oct 13, 2017 · 2 comments

Comments

@ugrg
Copy link

ugrg commented Oct 13, 2017

刚新建的一个express工程,加载了express-art-template,由于还没有设置任何routes,所在我在直接访问时肯定会报错,走进404的状态当中.
但这时,代码就会报

TypeError: target.hasOwnProperty is not a function

debug跟下来,发现是在递归遍历对象时,出现了一个对像的__proto__ = null的情况,这个对像应该是一个Error对像,不清楚为什么他的__proto__为什么会是null.

推荐你们把这里的target.hasOwnProperty修改成Object.hasOwnProperty.call(target, index),以避免这一错误的发生.

@ugrg ugrg changed the title 关于lib\compile\adapter\extend.js 关于lib\compile\adapter\extend.js target.hasOwnProperty is undefined Oct 13, 2017
@ugrg ugrg changed the title 关于lib\compile\adapter\extend.js target.hasOwnProperty is undefined 关于lib\compile\adapter\extend.js Oct 13, 2017
aui added a commit that referenced this issue Oct 13, 2017
@aui
Copy link
Owner

aui commented Oct 13, 2017

已经修复问题,非常感谢!

@aui aui closed this as completed Oct 13, 2017
@mingjiu
Copy link

mingjiu commented Oct 17, 2017

@aui #459 这个issue 应该也要关闭掉了吧

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

3 participants