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

Ignore linux for version range checks. #2186

Merged
merged 7 commits into from
Feb 12, 2017
Merged

Ignore linux for version range checks. #2186

merged 7 commits into from
Feb 12, 2017

Conversation

BrianAllred
Copy link
Contributor

Patch fixes issue #2103.

Copy link
Collaborator

@jostrander jostrander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, could probably use a separate if that more explicitly defines what is happening.

@BrianAllred
Copy link
Contributor Author

BrianAllred commented Jan 31, 2017 via email

@jostrander
Copy link
Collaborator

I'd defer to @MarshallOfSound before you change it, he might not mind. Just quickly glancing over it, it seems to be an appendage without explanation.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.319% when pulling 88201b8 on BrianAllred:master into d2bfd07 on MarshallOfSound:master.

@@ -23,7 +23,7 @@ export default class PlatformSpecific extends Component {
if (process.platform === this.props.platform) {
if (!this.props.versionRange) return this.props.children;

if (semver.validRange(this.props.versionRange) && semver.satisfies(osVersion, this.props.versionRange)) {
if ((semver.validRange(this.props.versionRange) && semver.satisfies(osVersion, this.props.versionRange)) || (osVersion === null && process.platform === 'linux')) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If osVersion is null we should not render regardless of platform. Also this appears to short-circuit the wrong way. The semver.satisfies check will called on null still.

Reverse the "or" order and don't check the platform 👍

Trying to keep this components in a state where they could be published separately

@voria
Copy link
Contributor

voria commented Feb 1, 2017

This does not fix the problem. As I described in the issue, the problem is mainly at lines 5-6 of the file src/renderer/ui/components/generic/PlatformSpecific.js, where parsedOSVersion is null and then there is an attempt to read its properties, causing an uncaught error.

@BrianAllred
Copy link
Contributor Author

@voria Interesting, I had the white screen issue and this fixed it for me. Maybe when I make @MarshallOfSound's suggested changes, it'll fix it for you.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 92.259% when pulling 5a24dc0 on BrianAllred:master into 81b4516 on MarshallOfSound:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 92.259% when pulling 5a24dc0 on BrianAllred:master into 81b4516 on MarshallOfSound:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 92.259% when pulling 335f237 on BrianAllred:master into 0094fdc on MarshallOfSound:master.

@SriRamanujam
Copy link

fwiw this patch does fix #2103 for me on git master, thank you!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 92.264% when pulling c8a17a8 on BrianAllred:master into 569c6eb on MarshallOfSound:master.

@MarshallOfSound MarshallOfSound merged commit 0598b95 into MarshallOfSound:master Feb 12, 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.

6 participants