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