You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
glob throws a TypeError when called with an empty string, but rejects with a TypeError when argument is undefined or null
Expected behavior
The behaviour should be consistent. Either all the TypeErrors should be thrown or put in a rejection branch.
Steps to reproduce
run fast-glob with an empty string
compare output to a run with undefined or null
Code sample
importfgfrom'fast-glob'console.log(fg(''))// TypeError: Expected a non-empty stringconsole.log(fg(null))// Promise <rejected> TypeError: Patterns must be a string or an array of strings
The text was updated successfully, but these errors were encountered:
kapooostin
changed the title
glob rejects with a TypeError when argument is undefined or null
glob throws a TypeError when called with an empty string
Jan 11, 2020
Environment
Actual behavior
glob
throws a TypeError when called with an empty string, but rejects with a TypeError when argument isundefined
ornull
Expected behavior
The behaviour should be consistent. Either all the TypeErrors should be thrown or put in a rejection branch.
Steps to reproduce
Code sample
The text was updated successfully, but these errors were encountered: