-
Notifications
You must be signed in to change notification settings - Fork 59
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
flexboxIE and flexboxOld fail to check in case of value is null #70
Comments
I have faced a similar issue while working on Material-UI. If I am not wrong, I should not be getting this issue when I am working on chrome right? And I am pretty sure I am always passing a value of display: 'flex' wherever needed. |
@divinetouch You're right. I already added the typecheck to some plugins, but seems I forgot for both flexbox cases. I was not aware that someone could actually pass an unsupported value, but sure ternary operators sometimes result in @tintin1343 Actually no. At least not with the new 1.0+ versions (Material still uses 0.6.x I guess). With <1.0 there's been an issue with display values other than @divinetouch Finally, feel free to submit a pull request fixing this one :) |
@rofrischmann : We upgraded it to v1 yesterday and it started failing after that. Let me check again. |
@tintin1343 Would be interessting to see a repro of that special case. Actually if your value is at least set (and type of string, which every |
@rofrischmann : I had to edit the file and remove |
@rofrischmann : I can fix it. Do you want me to make a PR? The change is basically a && condition. It fails for pages which does not have a display attribute. You are right. But if i'm using your library and it a particular page does not has a display property the library throws an error because of the flexboxOld.js
the |
@tintin1343 Replacing the properties[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1 Thanks for investigating and helping out though, feel free to edit your pull request and we will merge it asap. |
Changed the operators in flexboxIE.js and flexboxOld.js. This resolves issues in pages which don't have a display attribute. Closes robinweser#70
@rofrischmann : You are right. I'm making those changes. Thanks! |
I'm not really sure whether this is a bug or not as I encountered this issue when working with another project (Material-UI) that is using this library.
Basically the error occurs when the property is _display_ but the value is _null_ (_undefined_ is also a possibility?)
flexboxIE.js
flexboxOld.js
To get rid of the error temporary I added the check for value :
typeof value === 'string'
.The text was updated successfully, but these errors were encountered: