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

Check whether the given glob is valid #8

Closed
wants to merge 2 commits into from
Closed

Check whether the given glob is valid #8

wants to merge 2 commits into from

Conversation

saschagehlich
Copy link

Right now, .src() allows invalid globs and will throw a Cannot read property '0' of ... error. This PR adds a proper error for this.

@yocontra
Copy link
Member

Shouldn't you check typeof + Array.isArray?

@saschagehlich
Copy link
Author

Probably, yeah. I was not sure what glob can actually be. String and Array, right?

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 15d7b69 on saschagehlich:feature/invalid-blob into 191d4ae on wearefractal:master.

@yocontra
Copy link
Member

@saschagehlich Yep - should also check that array length is >= 1

@saschagehlich
Copy link
Author

@contra You mean >= 1, right?

@yocontra
Copy link
Member

@saschagehlich Yup

@yocontra yocontra closed this in a319889 Mar 17, 2014
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 27, 2017
phated pushed a commit that referenced this pull request Nov 28, 2017
phated pushed a commit that referenced this pull request Nov 28, 2017
phated pushed a commit that referenced this pull request Dec 5, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants