Fix QR context error on no set chosen

This commit is contained in:
Wolfsblvt 2024-07-30 19:54:17 +02:00
parent 18e3659914
commit 023bd840fa
2 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,7 @@ export class QuickReply {
get hasContext() { get hasContext() {
return this.contextList && this.contextList.length > 0; return this.contextList && this.contextList.filter(it => it.set).length > 0;
} }

View File

@ -40,6 +40,7 @@ export class ContextMenu {
children: [], children: [],
}; };
qr.contextList.forEach((cl) => { qr.contextList.forEach((cl) => {
if (!cl.set) return;
if (!hierarchy.includes(cl.set)) { if (!hierarchy.includes(cl.set)) {
const nextHierarchy = [...hierarchy, cl.set]; const nextHierarchy = [...hierarchy, cl.set];
const nextLabelHierarchy = [...labelHierarchy, tree.label]; const nextLabelHierarchy = [...labelHierarchy, tree.label];