deepClone() method not defined on underscore
mindjuice opened this issue · comments
Ken Carpenter commented
This isn't working in my project. It hits the exports = factory(_);
line during initialization (see below), but then when I call _.deepClone()
from my app, the internal underscore that you are using isn't augmented with a deepClone()
method, so it crashes.
if (typeof exports !== 'undefined') {
var _ = require('underscore');
if (typeof module !== 'undefined' && module.exports)
module.exports = factory(_);
exports = factory(_);
} else {
root._.mixin(factory(root._));
}
I'm using Browserify for my builds, although not sure if that matters.
Ken Carpenter commented
This is the same issue that is fixed by PR #2.
Mateus Maso commented
I'll be taking a look on that and pushing a new version soon, thanks for pointing out