Skip to content

Commit 583f6a6

Browse files
authored
Add truthy check for data.policies before calling 'includes' on it (#9467)
1 parent 325dece commit 583f6a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/app/services/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export default Service.extend({
313313

314314
this.getTokensFromStorage().forEach(key => {
315315
const data = this.getTokenData(key);
316-
if (data && data.policies.includes('root')) {
316+
if (data && data.policies && data.policies.includes('root')) {
317317
this.removeTokenData(key);
318318
}
319319
});

0 commit comments

Comments
 (0)