Replacing scope object with primitive does not update correctly
tdhsmith opened this issue · comments
(Here's a minimal example Plunkr.)
When a scope object is replaced with another object, the inspector version is replaced immediately and correctly. However, when an object is replaced with a primitive, some components still reference the old object:
- If the property drop-down is open, the only visible change is the type icon. Otherwise in all ways, the inspector shows the old object.
- If the property drop-down is closed, the primitive value is shown, however the property count is still visible, and the drop-down can be opened, leading to the above case.
- In both situations, clicking the name or value will print the old object to the console.
@tdhsmith Thanks for the thorough report, and great catch!
Unfortunately Plunkr links pointing to their run
subdomain expire shortly after they're created, so I'm adding a link to an editable Plunkr (which shouldn't expire) - http://plnkr.co/edit/Ap0GsyKgS9SqoSo71arJ?p=preview
We're currently pre-occupied with some changes we're looking into for ng-inspector
, so I unfortunately can't say that we'll be able to address this quickly. Having said that, we'd love support if you or anyone else wants to contribute a fix.
Oh whoops! I suppose it makes sense Plunkr would leave those pages up indefinitely...
If I ever get that free time for OSS-work I've been dreaming of, I'll be happy to try to hammer this out, but at the moment it's definitely 2-3 weeks out at least.
If I ever get that free time for OSS-work I've been dreaming of
I know that feeling :)
Ok, I actually managed to make the main changes today (c41b0c8), but I won't be able to test it extensively for a while. Presumably you'd like to see unit tests before PR?