From aa905b08015efa677d995067ce11c281075cf050 Mon Sep 17 00:00:00 2001 From: Chloe Zermatten Date: Tue, 24 Mar 2026 10:01:19 +0000 Subject: [PATCH] Bug 10190: (follow-up): fix: mtt formating: handle unset This is needed to handle creating new triggers for libraries for which all earlier triggers are defaults (do not exist in the DB , are not explicitly set) Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim --- .../intranet-tmpl/prog/js/vue/stores/circulation-rules.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/circulation-rules.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/circulation-rules.js index 34bf3a5b8e..63d18fa48a 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/circulation-rules.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/circulation-rules.js @@ -413,6 +413,10 @@ export const useCircRulesStore = defineStore("circRules", () => { async getSelectedRuleSet(context) { const rawSelectedRuleSet = await this.getRawSelectedRuleSet(context); + if (!rawSelectedRuleSet) { + return; + } + let formattedSelectedRuleSet = cloneDeep(rawSelectedRuleSet); let i = 1; while (i <= this.triggerCounts[this.currentLibraryId]) {