Yomguithereal / baobab

JavaScript & TypeScript persistent and optionally immutable data tree with cursors.
MIT License
3.15k stars 117 forks source link

Monkey path definition needs array #424

Closed bverjat closed 8 years ago

bverjat commented 8 years ago

Dear @Yomguithereal.

As you can see on my screen, while trying to setup a Monkey using 'pointId' and 'points' instead of ['pointId'] and ['points']

…
pointId:0,
point: Baobab.monkey('pointId','points', function(id, points) {
  return points[id] || null;
})
…

you're getting an error :


Uncaught TypeError: path.some is not a function

type.dynamicPath @ lib.min.js:24610
MonkeyDefinition @ lib.min.js:24254
Baobab.monkey @ lib.min.js:22720
(anonymous function) @ main.js:11
fire @ lib.min.js:3099
self.fireWith @ lib.min.js:3211
done @ lib.min.js:8264(anonymous function) @ lib.min.js:8605