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 {
66 blacklistPending : 'feathers-vuex-usersettings/isPending'
77 } ) ,
88 isBlacklisted ( ) {
9- return this . currentUserSettings . blacklist . includes ( this . author ( ) . _id )
9+ let { blacklist } = this . currentUserSettings
10+ return blacklist || blacklist . includes ( this . author ( ) . _id )
1011 }
1112 } ,
1213 methods : {
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ import Author from '~/components/Author/Author.vue'
2424 }
2525 },
2626 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 } } } );
2930 return {
3031 blacklistedUsers: res .data
3132 }
You can’t perform that action at this time.
0 commit comments