Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fibrous breaks options.sync check #340

Closed
gavinaiken opened this issue Jun 2, 2017 · 1 comment
Closed

Fibrous breaks options.sync check #340

gavinaiken opened this issue Jun 2, 2017 · 1 comment

Comments

@gavinaiken
Copy link

The issue is that fibrous adds a sync function to Object.prototype so when glob creates an empty object for its options, sync is truthy on that new options object.

> var obj = {};
> console.log(obj.sync);
// undefined
> var fibrous = require('fibrous');
> var obj = {};
> console.log(obj.sync);
// { that: {} }
> var obj = Object.create(null)
> console.log(obj.sync);
// undefined

This is really more fibrous's issue than glob's, but there is a simple fix in glob, so I wanted to see if you would be willing to accept a PR for it. e.g. we could change:

if (typeof options === 'function') cb = options, options = {}

to:

if (typeof options === 'function') cb = options, options = Object.create(null)

Happy to submit a PR if you would consider it...

Also see issue goodeggs/fibrous#41 in fibrous.

@isaacs
Copy link
Owner

isaacs commented Feb 28, 2023

No longer relevant in v9.

@isaacs isaacs closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants