jpex-js / jpex

Javascript Prototype Extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Array-like dependencies are incorrectly flattened

jackmellis opened this issue · comments

commented

If you have a dep that’s an array and you try to use that in another factory, it destructures the array and passes it in as individual parameters

jpex.constant(‘arr’, [ 1, 2, 3 ])
jpex.factory(‘foo’, [ ‘arr’ ], (arr) => {
  arr === 1
})

return value.concat(x);