Throw a helpful error when people use isFastboot instead of isFastBoot#814
Merged
rwjblue merged 1 commit intoember-fastboot:masterfrom Mar 18, 2021
bertdeblock:throw-when-using-nonexistent-fastboot-service-property
Merged
Throw a helpful error when people use isFastboot instead of isFastBoot#814rwjblue merged 1 commit intoember-fastboot:masterfrom bertdeblock:throw-when-using-nonexistent-fastboot-service-property
isFastboot instead of isFastBoot#814rwjblue merged 1 commit intoember-fastboot:masterfrom
bertdeblock:throw-when-using-nonexistent-fastboot-service-property
Conversation
bertdeblock
commented
Mar 16, 2021
| headers: deprecatingAlias('request.headers', { id: 'fastboot.headers-to-request', until: '0.9.9' }), | ||
| isFastBoot: typeof FastBoot !== 'undefined', | ||
|
|
||
| isFastboot: computed(function() { |
Contributor
Author
There was a problem hiding this comment.
Or should we warn here instead and return this.isFastBoot?
Member
There was a problem hiding this comment.
I think an assertion is fine, though I'd prefer if we didn't make this a computed (it will only assert the first time it is accessed I think).
We should consider migrating to native classes here, and then using a native getter directly. Unfortunately, we'll have to do this conditionally based on Ember version. We need to drop Ember < 3.12 support, would you mind making an issue for discussing that?
Contributor
Author
There was a problem hiding this comment.
Created #815 for this. Should I just leave the PR until using a native getter is possible or?
mansona
approved these changes
Mar 18, 2021
Member
mansona
left a comment
There was a problem hiding this comment.
Woop thanks for the contribution 🎉
rwjblue
approved these changes
Mar 18, 2021
Merged
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://discord.com/channels/480462759797063690/485861149821239298/821177803721801778