{"action":"created","issue":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/305","labels_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/305/comments","events_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/305/events","html_url":"https://github.com/Yomguithereal/baobab/issues/305","id":96642969,"number":305,"title":"Facet bug","user":{"login":"ivan-kleshnin","id":2128182,"avatar_url":"https://avatars.githubusercontent.com/u/2128182?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan-kleshnin","html_url":"https://github.com/ivan-kleshnin","followers_url":"https://api.github.com/users/ivan-kleshnin/followers","following_url":"https://api.github.com/users/ivan-kleshnin/following{/other_user}","gists_url":"https://api.github.com/users/ivan-kleshnin/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-kleshnin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-kleshnin/subscriptions","organizations_url":"https://api.github.com/users/ivan-kleshnin/orgs","repos_url":"https://api.github.com/users/ivan-kleshnin/repos","events_url":"https://api.github.com/users/ivan-kleshnin/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-kleshnin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-22T19:14:22Z","updated_at":"2015-07-22T19:24:41Z","closed_at":null,"body":"```js\r\nimport Baobab from \"baobab\";\r\n\r\nlet state = new Baobab(\r\n  {\r\n    ajaxQueue: [],\r\n\r\n    foo: {\r\n      $bar: [\r\n        [\"xxx\"],\r\n        function () {\r\n          return true;\r\n        }\r\n      ],\r\n    },\r\n  },\r\n  { // OPTIONS\r\n    immutable: false\r\n  }\r\n);\r\n\r\nstate.select(\"foo\").get();\r\n\r\nstate.select(\"ajaxQueue\").push({});\r\n```\r\n\r\n```\r\nError: Baobab.Facet: attempting to create a computed data node with a wrong definition (path: /foo/$bar).\r\n    at makeError (/.../node_modules/baobab/dist/helpers.js:429:13)\r\n    at new Facet (/.../node_modules/baobab/dist/facet.js:46:36)\r\n    at walk (/.../node_modules/baobab/dist/baobab.js:182:27)\r\n    at walk (/.../node_modules/baobab/dist/baobab.js:186:15)\r\n    at Baobab._refreshComputedDataIndex (/.../node_modules/baobab/dist/baobab.js:202:16)\r\n    at Baobab.update (/.../node_modules/baobab/dist/baobab.js:306:12)\r\n    at Cursor.(anonymous function) [as push] (/.../node_modules/baobab/dist/cursor.js:800:22)\r\n    at Object.<anonymous> (/.../test.js:23:27)\r\n    at Module._compile (module.js:460:26)\r\n    at normalLoader (/usr/local/lib/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:147:5)\r\n```\r\n\r\nTo replicate the error next 4 things are required:\r\n\r\n1) Declare nested facet\r\n2) Set immutable = false\r\n3) Read from nested facet\r\n4) Write somewhere in the tree\r\n\r\n:laughing: \r\n\r\nVerified in Node and Chrome."},"comment":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/comments/123834035","html_url":"https://github.com/Yomguithereal/baobab/issues/305#issuecomment-123834035","issue_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/305","id":123834035,"user":{"login":"Yomguithereal","id":2571951,"avatar_url":"https://avatars.githubusercontent.com/u/2571951?v=3","gravatar_id":"","url":"https://api.github.com/users/Yomguithereal","html_url":"https://github.com/Yomguithereal","followers_url":"https://api.github.com/users/Yomguithereal/followers","following_url":"https://api.github.com/users/Yomguithereal/following{/other_user}","gists_url":"https://api.github.com/users/Yomguithereal/gists{/gist_id}","starred_url":"https://api.github.com/users/Yomguithereal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yomguithereal/subscriptions","organizations_url":"https://api.github.com/users/Yomguithereal/orgs","repos_url":"https://api.github.com/users/Yomguithereal/repos","events_url":"https://api.github.com/users/Yomguithereal/events{/privacy}","received_events_url":"https://api.github.com/users/Yomguithereal/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T19:24:41Z","updated_at":"2015-07-22T19:24:41Z","body":"Ok. Will test this asap and see where I went wrong."}}