canjs / can-view-scope

Scope management for view engines
https://canjs.com/doc/can-view-scope.html
MIT License
4 stars 0 forks source link

Props whose name shadow a can-event-queue property get rendered as `function() { [native code] } #204

Closed matthewp closed 5 years ago

matthewp commented 5 years ago

https://github.com/canjs/can-stache-define-element/commit/bfda6122fa97c67bcaba48ff442121273693d56d

This might be a bug in can-define-mixin but I'm not sure yet.

phillipskevin commented 5 years ago

This is displaying one from can-event-queue/map/map: https://github.com/canjs/can-event-queue/blob/24ec763a5ce9dfcf86e92e3d5c9fdf838f49625a/map/map.js#L387-L397

I'm thinking through how to prevent this.

phillipskevin commented 5 years ago

This actually happens with can-component also. The issue is that the LetContext that gets created by stache here: https://github.com/canjs/can-stache/blob/bf87a5acc05dbb3a38513903807e22b39b1948a5/can-stache.js#L546

...creates a SimpleMap which has a one property from can-event-queue.

I'm not sure what to do about this, but I think we should punt on it for now.

matthewp commented 5 years ago

Ok, so using one as a property is a bad example, but that wasn't the bug I was seeing (which was that value() was unusable as there is some regression). I will try and recreate.

matthewp commented 5 years ago

This is a better codepen that illustrates the problem: https://codepen.io/matthewp/pen/Yodwab?editors=1010

value() doesn't update.

matthewp commented 5 years ago

New bug: https://github.com/canjs/can-stache-define-element/issues/53