You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! This is because res.locals is meant to be a bag for you to store key value pairs, meaning it is perfectly OK to do res.locals.hasOwnProperty = 'foo' and everything will still work fine. If you need to call hasOwnProperty on it, you need to do Object.prototype.hasOwnProperty.call(res.locals, 'propName').
Sorry to bring this back up, but I think @trquoccuong's question is important. This is very unexpected behavior IMO. I think we should maybe consider changing this behavior in express 5.0. Is there somewhere this decision was made that I could read over so I understand more?
Hi . I think res.locals similar with app.locals (javascript Object) But I cant call buildin function hasOwnProperty .
http://stackoverflow.com/questions/32878954/object-javascipt-dont-have-build-in-function-hasownproperty
The text was updated successfully, but these errors were encountered: