File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ export default {
6
6
blacklistPending : 'feathers-vuex-usersettings/isPending'
7
7
} ) ,
8
8
isBlacklisted ( ) {
9
- return this . currentUserSettings . blacklist . includes ( this . author ( ) . _id )
9
+ let { blacklist } = this . currentUserSettings
10
+ return blacklist || blacklist . includes ( this . author ( ) . _id )
10
11
}
11
12
} ,
12
13
methods : {
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ import Author from '~/components/Author/Author.vue'
24
24
}
25
25
},
26
26
async asyncData ({store}) {
27
- const currentUserSettings = store .getters [' feathers-vuex-usersettings/current' ];
28
- const res = await store .dispatch (' feathers-vuex-users/find' , { query: {_id: { $in: currentUserSettings .blacklist } } } );
27
+ const { blacklist } = store .getters [' feathers-vuex-usersettings/current' ];
28
+ if (! blacklist) return {}
29
+ const res = await store .dispatch (' feathers-vuex-users/find' , { query: {_id: { $in: blacklist } } } );
29
30
return {
30
31
blacklistedUsers: res .data
31
32
}
You can’t perform that action at this time.
0 commit comments