Do not populate EmberENV with default values#24
Merged
rwjblue merged 1 commit intoemberjs:masterfrom Sep 17, 2018
Merged
Conversation
Contributor
Author
Member
|
#25 is landed... |
rwjblue
approved these changes
Sep 14, 2018
Member
|
Changes look good, will land once rebase... |
This is to enable the Ember runtime to distinguish between `true` by default and explicitly `true`. Which is required to correctly implement the `jQuery.originalEvent` deprecation, where this should only be triggered when jQuery is enabled by default, and not when it is explicitly enabled. Previously `EmberENV['_JQUERY_INTEGRATION']` would be `true` for both cases, with no way to distinguish. Now when the flag is not explicitly set `EmberENV['_JQUERY_INTEGRATION']` will be `undefined`. The default value will now only be used for the `isFeatureEnabled()` check, but not for populating `EmberENV` anymore. Fixes emberjs/ember.js#16849
80fc101 to
903c9d0
Compare
Contributor
Author
|
@rwjblue done! |
rwjblue
approved these changes
Sep 17, 2018
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.
This is to enable the Ember runtime to distinguish between
trueby default and explicitlytrue. Which is required to correctly implement thejQuery.originalEventdeprecation, where this should only be triggered when jQuery is enabled by default, and not when it is explicitly enabled. PreviouslyEmberENV['_JQUERY_INTEGRATION']would betruefor both cases, with no way to distinguish. Now when the flag is not explicitly setEmberENV['_JQUERY_INTEGRATION']will beundefined, which Ember will still treat astrueby default hereThe default value will now only be used for the
isFeatureEnabled()check, but not for populatingEmberENVanymore.Fixes emberjs/ember.js#16849
Note: I confirmed with the provided reproduction that this fixes the jQuery issue above. But I am not sure if this can have any unexpected implications for the other two optional features, as I am unaware how exactly they are implemented. So please double check if the changes here are acceptable! If not, maybe we would have to introduce another flag for a given feature, that specifies if the default value should be set or not!? 🤔