Bug computing ツabsolutePath in set for nodes after following a reference
trxcllnt opened this issue · comments
Paul Taylor commented
Found a bug in set when computing optimized paths for nodes set after following a reference.
Click here to see repro code
var model = new falcor.Model(); model._setJSONGs(model, [{ paths: [ ['genrelist', [0, 1], 'titles', 0, 'name'] ], jsonGraph: { genrelist: { 0: { titles: { 0: { $type: 'ref', value: ['titlesById', 32] } } }, 1: { titles: { 0: { $type: 'ref', value: ['titlesById', 87] } } } } }, titlesById: { 32: { name: 'Die Hard' }, 87: { name: 'How to Lose a Guy in Ten Days' } } }]); var cache = model._root.cache; console.log(JSON.stringify(cache.genrelist[0].ツabsolutePath)); // <-- ["genrelist",0] console.log(JSON.stringify(cache.genrelist[1].ツabsolutePath)); // <-- ["name", 1], should be ["genrelist",1]