madebymany/sir-trevor-js — pull request #123 by zertosh (2013-11-21 04:25:23+00:00)
Title: Lo-Dash / Underscore compatibility fix

`Lo-Dash` currently drops non-array elements in `_.union`. As a result `FunctionBind` doesn't work when using `Lo-Dash`. Since `this` isn't an array, the context for `_.bindAll` is set to the first element of `this.bound` instead.

In the current version of `Underscore`, `_.union` will `push` non-array elements and merge arrays. However, `Underscore` has decided to follow the `Lo-Dash` approach (see: https://github.com/jashkenas/underscore/pull/1317). So soon this will be a problem with `Underscore`, like it currently is with `Lo-Dash`. By wrapping the `this` in an array, `FunctionBind` will work with the current and future versions of `Lo-Dash` and `Underscore`.