Send module update upon result only once
This commit is contained in:
parent
013788a5bc
commit
c58e33b1e9
|
|
@ -30,14 +30,13 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
module: {},
|
module: {},
|
||||||
|
updateSent: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.$log.debug('**** module.vue created ****');
|
this.$log.debug('**** module.vue created ****');
|
||||||
this.$log.debug(`||| module id ${this.module.id} |||`);
|
this.$log.debug(`||| module id ${this.module.id} |||`);
|
||||||
|
|
||||||
this.updateLastVisitedModule(this.module.id);
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$log.debug('**** module.vue mounted ****');
|
this.$log.debug('**** module.vue mounted ****');
|
||||||
|
|
@ -54,10 +53,13 @@
|
||||||
update(data) {
|
update(data) {
|
||||||
return this.$getRidOfEdges(data).module || {};
|
return this.$getRidOfEdges(data).module || {};
|
||||||
},
|
},
|
||||||
// result({data: {module: {id}}}) {
|
result({data: {module: {id}}}) {
|
||||||
// this.$log.debug(`=== updating result for module ${id} ===`);
|
if (!this.updateSent) {
|
||||||
// this.updateLastVisitedModule(id);
|
this.$log.debug(`=== updating result for module ${id} ===`);
|
||||||
// },
|
this.updateLastVisitedModule(id);
|
||||||
|
this.updateSent = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
fetchPolicy: 'cache-first',
|
fetchPolicy: 'cache-first',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue