christianalfoni / cerebral-react-baobab

A Cerebral package with React and Baobab
MIT License
13 stars 1 forks source link

onReset fails #8

Closed saulshanabrook closed 9 years ago

saulshanabrook commented 9 years ago

The chrome extension calls the onReset function, when it starts recording. This raises an error for me:

Uncaught TypeError: Cannot assign to read only property '$system' of #<Object>
    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:312:15)
    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:321:7)
    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:321:7)
    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:321:7)
    at getIn (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:396:23)
    at Baobab.update (eval at <anonymous> (http://localhost:8080/main.js:1946:2), <anonymous>:274:39)
    at Cursor.(anonymous function) [as set] (eval at <anonymous> (http://localhost:8080/main.js:1964:2), <anonymous>:800:22)
    at Baobab._this.(anonymous function) [as set] (eval at <anonymous> (http://localhost:8080/main.js:1946:2), <anonymous>:142:33)
    at Object.eval (eval at evaluate (unknown source), <anonymous>:1:6)
    at Object.InjectedScript._evaluateOn (<anonymous>:875:55)
saulshanabrook commented 9 years ago

I opened https://github.com/Yomguithereal/baobab/issues/323 because I suspect this might be a bug in baobab

saulshanabrook commented 9 years ago

The problem was that I had a facet in my baobab tree (called $system).

I am guessing facets aren't really supported, I opened #9 for this issue

christianalfoni commented 9 years ago

And hooks for recording is not yet implemented, but can fix that