From 206531a6677db4841289423b052360fb7ab60d3e Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 23 May 2022 16:43:40 +0200 Subject: [PATCH] Fix missing variable --- client/src/components/ContentBlock.vue | 2 +- client/src/components/instruments/InstrumentEntry.vue | 4 +++- client/src/helpers/instrumentType.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue index 1070a9b7..3478d7c6 100644 --- a/client/src/components/ContentBlock.vue +++ b/client/src/components/ContentBlock.vue @@ -138,7 +138,7 @@ if (!(contentType in instruments)) { return ''; } - return instrumentCategory(); + return instrumentCategory(this.instrument); }, canEditContentBlock() { return this.contentBlock.mine && !this.contentBlock.indent; diff --git a/client/src/components/instruments/InstrumentEntry.vue b/client/src/components/instruments/InstrumentEntry.vue index 712d3976..f93bad69 100644 --- a/client/src/components/instruments/InstrumentEntry.vue +++ b/client/src/components/instruments/InstrumentEntry.vue @@ -33,7 +33,9 @@ 'instrument-entry__interdisciplinary': this.instrument.type.category === INTERDISCIPLINARY, }; }, - categoryName: instrumentCategory, + categoryName() { + return instrumentCategory(this.instrument); + }, }, }; diff --git a/client/src/helpers/instrumentType.js b/client/src/helpers/instrumentType.js index 9962727b..c3060249 100644 --- a/client/src/helpers/instrumentType.js +++ b/client/src/helpers/instrumentType.js @@ -11,11 +11,11 @@ const instrumentType = ({type: {category}}) => { } }; -const instrumentCategory = () => { +const instrumentCategory = (instrument) => { if (flavor.appFlavor === 'my-kv') { return flavor.textInstruments; } else { - return instrumentType(this.instrument); + return instrumentType(instrument); } };