-
Notifications
You must be signed in to change notification settings - Fork 250
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
Case-insensitive regexes for checking image extensions #270 #278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to have regex as global variable
Fixes #270 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the regex!
lib/loadGltfUris.js
Outdated
@@ -169,7 +168,7 @@ var jimpSupportedExtensions = ['.png', '.jpg', '.jpeg', '.bmp']; | |||
function generateJimpImage(object) { | |||
var pipelineExtras = object.extras._pipeline; | |||
var ext = pipelineExtras.extension; | |||
if (jimpSupportedExtensions.indexOf(ext) === -1) { | |||
if (supportedExtensions.test(ext)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be !supportedExtensions.test(ext)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like me and @mramato replied at about the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mramato @lilleyse Silly mistake sorry . I appreciate the patience with me muddling my way through this first attempt at GitHub and my first attempt at contributing to a "real" project. I hope I haven't been to much of a disturbance in the operation of things for everyone. Thank you for allowing me to participate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't be so hard on yourself. We are were all first time committers at some point. We are happy to help and appreciate your help.
Thanks @ryki2658, the tests are failing because you reversed the if check. Previously it was checking if the extension was not in the list, now it's checking if it is in the list. You need to add a |
Thanks again, @ryki2658. |
No problem happy to be involved! |
…image extensions