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

Be more explicit about detecting fs.readdirSync support. #56

Closed
wants to merge 3 commits into from

Conversation

alecperkins
Copy link

Tools like Browserify result in a require('fs') that returns something not falsey, so this more explicit checking prevents the fs.readdirSync call from being attempted unless the function itself exists.

Tools like Browserify result in a require('fs') that returns something not falsey.
@craigspaeth
Copy link

+1

@spikebrehm
Copy link

Why not just

if (fs && fs.readdirSync)

?

@ThomasDeutsch
Copy link

+1

@avanc
Copy link

avanc commented Feb 7, 2014

+1 from my side as I ran into the same problem an these changes fixes it for me.

@tivie
Copy link
Member

tivie commented Jan 5, 2015

#50

@tivie
Copy link
Member

tivie commented May 15, 2015

fixed in eae5f0e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants