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

Fix check for supported file types #1311

Closed

Conversation

michaltk
Copy link

@michaltk michaltk commented May 6, 2019

There was a check for supported file types added but it’s checking for supportedFileTypes.indexOf(path.extname(handler)) !== '-1' ,
indexOf returns a number -1 not a string '-1', so this check was always true.

Updated to number -1 instead of string.

The check for supported file types was added here - OptimalBits#1186.
It’s checking for `supportedFileTypes.indexOf(path.extname(handler)) !== -1 ` but indexOf return a number `-1` not a string `’-`’`, so this check was always true.

Updated to the number `-1`.
@michaltk
Copy link
Author

#1320

@michaltk michaltk closed this May 17, 2019
@michaltk michaltk deleted the fix-supported-file-check branch May 17, 2019 22:21
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

1 participant