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

When using an Ember build from Bower, Invalid Version: false #422

Closed
mixonic opened this issue Jan 8, 2020 · 0 comments · Fixed by #423
Closed

When using an Ember build from Bower, Invalid Version: false #422

mixonic opened this issue Jan 8, 2020 · 0 comments · Fixed by #423

Comments

@mixonic
Copy link
Member

mixonic commented Jan 8, 2020

When using an version of Ember from bower ember at

let ember = this.project.addons.find(a => a.name === 'ember-source');

...is undefined, thus emberVersion at

let emberVersion = ember !== undefined && ember.pkg.version;

is false. Then emberVersion is passed to semver.gte(

let hasValidEmberVersion = semver.gte(emberVersion, '3.13.0');

resulting in an exception being thrown. It seems like that final line 46 should be

let hasValidEmberVersion = emberVersion && semver.gte(emberVersion, '3.13.0');
mixonic added a commit to mixonic/ember-cli-htmlbars that referenced this issue Jan 8, 2020
Prior to this patch the value `false` would be passed to `semver.gte(`
causing an exception of `Invalid Version: false`. This ensures the range
validity of the version is only checked if one is present.

Specifically bower versions of Ember have an `emberVersion` of `false`
here. However none of those versions of Ember support co-location.

Fixes ember-cli#422
rwjblue pushed a commit to mixonic/ember-cli-htmlbars that referenced this issue Jan 8, 2020
Prior to this patch the value `false` would be passed to `semver.gte(`
causing an exception of `Invalid Version: false`. This ensures the range
validity of the version is only checked if one is present.

Specifically bower versions of Ember have an `emberVersion` of `false`
here. However none of those versions of Ember support co-location.

Fixes ember-cli#422
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 a pull request may close this issue.

1 participant