Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Commit 451d75b

Browse files
committed
perf(pinia): ⚡️ reduce fetchVotes
1 parent 1e74dea commit 451d75b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stores/usePluginsStore.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ export const usePluginsStore = defineStore("plugins", {
126126
* Update plugins votes.
127127
*/
128128
async updatePluginVotes() {
129+
if (this.pluginVotesSummary !== undefined) {
130+
return;
131+
}
132+
129133
this.pluginVotesSummary = await useBackend().fetchVotes();
130134

131135
for (const id in this.pluginDataBriefSummary) {

0 commit comments

Comments
 (0)