Skip to content

Commit 26e57f6

Browse files
simonihmigkategengler
authored andcommitted
Fix jquery-integration optional feature flag to only throw when explicitly enabled.
(cherry picked from commit 52413c2)
1 parent 89b88ff commit 26e57f6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ module.exports = {
6363
name: 'ember-source',
6464
paths,
6565
absolutePaths,
66-
_jqueryIntegrationEnabled: true,
6766
_overrideTree: undefined,
6867

6968
included() {
@@ -143,10 +142,12 @@ module.exports = {
143142
}
144143
}
145144

146-
this._jqueryIntegrationEnabled =
147-
!optionalFeaturesMissing && optionalFeatures.isFeatureEnabled('jquery-integration');
148-
149-
if (this._jqueryIntegrationEnabled) {
145+
if (
146+
!optionalFeaturesMissing &&
147+
optionalFeatures.isFeatureEnabled('jquery-integration') &&
148+
typeof optionalFeatures.isFeatureExplicitlySet === 'function' &&
149+
optionalFeatures.isFeatureExplicitlySet('jquery-integration')
150+
) {
150151
const SilentError = require('silent-error');
151152
throw new SilentError(
152153
'Setting the `jquery-integration` optional feature flag to `true` was deprecated in Ember 3.x and removed in Ember 4.0.0. You must add the `@ember/optional-features` addon and set this feature to `false`.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_optional-feature-jquery-integration'

0 commit comments

Comments
 (0)