fix: 🐛 filterby deprecation warning (#1861)
This commit is contained in:
1 parent
7349867b76
commit
eed62ac515
2 files changed
+5
-3
No files matched your search
@@ -52,7 +52,8 @@ export default class ScopesScopeAuthenticateRoute extends Route {
|
||||
// and filter out any that have no auth methods
|
||||
const scopes = this.modelFor('scopes').filter(
|
||||
({ id: scope_id, isOrg }) =>
|
||||
isOrg && authMethodsForAllScopes.filterBy('scopeID', scope_id).length
|
||||
isOrg &&
|
||||
authMethodsForAllScopes.filter((i) => i.scopeID === scope_id).length
|
||||
);
|
||||
return hash({
|
||||
scope: this.modelFor('scopes.scope'),
|
||||
|
||||
@@ -23,8 +23,9 @@ export default class ScopesScopeIndexRoute extends Route {
|
||||
* If authenticated but no orgs exist, redirect into onboarding.
|
||||
*/
|
||||
redirect(model) {
|
||||
const hasOrgs = this.store.peekAll('scope').filterBy('type', 'org').length;
|
||||
|
||||
const hasOrgs = this.store
|
||||
.peekAll('scope')
|
||||
.filter((scope) => scope.type === 'org').length;
|
||||
// Must authenticate before proceeding anywhere else
|
||||
if (!this.session.isAuthenticated) {
|
||||
return this.router.transitionTo('scopes.scope.authenticate');
|
||||
|
||||
Reference in new issue
Block a user