omsmith / browserify-ngannotate

57 stars 7 forks source link

Recursive default options #14

Closed arathael closed 9 years ago

arathael commented 9 years ago

Hi, i'm running into a problem when invoking this transform from node-enchilada, it is invoked without options at all, so in index.js:13

    opts = defaults(opts, {
        add: true,
        x: [],
        ext: [],
        sourcemap: opts._flags.debug
    });

opts is self referencing a child object _flags which is undefined and throws an error when running without arguments.

omsmith commented 9 years ago

Thanks for reporting the issue - sorry about that!

arathael commented 9 years ago

Hey man, thank you for the lib. Glad to help.