File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
packages/@vue/cli-ui/src/components Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,30 @@ export default {
8
8
query: CLIENT_ADDONS ,
9
9
fetchPolicy: ' no-cache' ,
10
10
manual: true ,
11
- result ({ data: { clientAddons } }) {
12
- clientAddons .forEach (this .loadAddon )
11
+ result ({ data: { clientAddons }, stale }) {
12
+ if (! stale) {
13
+ clientAddons .forEach (this .loadAddon )
14
+ this .$_lastRead = Date .now ()
15
+ }
13
16
}
14
17
},
15
18
16
19
$subscribe: {
17
20
clientAddonAdded: {
18
21
query: CLIENT_ADDON_ADDED ,
19
22
result ({ data }) {
20
- this .loadAddon (data .clientAddonAdded )
23
+ if (this .$_lastRead && Date .now () - this .$_lastRead > 1000 ) {
24
+ this .loadAddon (data .clientAddonAdded )
25
+ }
21
26
}
22
27
}
23
28
}
24
29
},
25
30
31
+ created () {
32
+ this .$_lastRead = null
33
+ },
34
+
26
35
methods: {
27
36
loadAddon (addon ) {
28
37
// eslint-disable-next-line no-console
You can’t perform that action at this time.
0 commit comments