Skip to content

Commit 6b617f8

Browse files
committedNov 12, 2022
SearchResults: remove computed search prop
It is only used in one location, and not from the template. In other words we should inline it to make the code simpler.
1 parent 0fa2035 commit 6b617f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎client/components/Windows/SearchResults.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,14 @@ export default defineComponent({
129129
const oldScrollTop = ref(0);
130130
const oldChatHeight = ref(0);
131131
132-
const search = computed(() => store.state.messageSearchResults);
133132
const messages = computed(() => {
134-
if (!search.value) {
133+
const results = store.state.messageSearchResults?.results;
134+
135+
if (!results) {
135136
return [];
136137
}
137138
138-
return search.value.results;
139+
return results;
139140
});
140141
141142
const chan = computed(() => {
@@ -307,7 +308,6 @@ export default defineComponent({
307308
loadMoreButton,
308309
messages,
309310
moreResultsAvailable,
310-
search,
311311
network,
312312
channel,
313313
route,

0 commit comments

Comments
 (0)
Please sign in to comment.