princejwesley / Mancy

>_ Electron based NodeJS REPL :see_no_evil:
http://mancy-re.pl
MIT License
2.63k stars 133 forks source link

Global Environment display doesn't update for changes to nested objects/arrays #157

Open dchalmers opened 7 years ago

dchalmers commented 7 years ago

if I have an array (or another object) nested in an object, and I make a change to that array using the REPL, then the change does not appear in the Global Environment display UNLESS I collapse/expand the object using the triangle.

Sample code:

var myObj = {
  arr: [1,2,3],
  fn: function (val) { this.arr.push(val) }
}

var arr2 = [1,2,3]

myObj.fn(4) // does not update the display in global environment unless you collapse/expand the surrounding object
arr2.push(4) // updates immediately in global environment