rev087/ng-inspector

Replacing scope object with primitive does not update correctly

Open

#138 opened on Sep 23, 2015

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (100 forks)batch import
bughelp wanted

Repository metrics

Stars
 (787 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

(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. screen shot 2015-09-23 at 3 21 55 pm
  • 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.

Contributor guide