Skip to content

_.endsWith exception when initializing  #8

@slowdownitsfine

Description

@slowdownitsfine

Hi,

I'm loving the Meteor Workers and the simplicity behind them!

However during the startup of Meteor (1.0.4.2), after adding differential:workers to packages I was getting the following exception trace (edited):

...
Object function (obj) {
W20150326-19:53:41.929(1)? (STDERR)     if (obj instanceof _) return obj;
W20150326-19:53:41.929(1)? (STDERR)     if (!(this instanceof _)) return new _(obj);
W20150326-19:53:41.929(1)? (STDERR)     this._wrapped = obj;
W20150326-19:53:41.929(1)? (STDERR)   } has no method 'endsWith' date=Thu Mar 26 2015 19:53:41 GMT+0100 (CET), pid=65654, uid=501, gid=20, 
...
trace=[column=23, file=packages/differential:workers/lib/init.coffee, function=null, line=5, method=null, native=false, column=22
...

I didn't know _.endsWith() and didn't know that Underscore.string wasn't part of the standard Underscore distribution.

I found a workaround for this problem which consisted in adding underscorestring:underscore.string to packages and mapping the function under the globally exported s by the package to underscore like so:

_.endsWith = s.endsWith

Maybe this could be fixed by adding underscorestring:underscore.string to the dependencies of the package and changing the call to _.endsWith ... but that's just a suggestion :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions