Fix QR context error on no set chosen
This commit is contained in:
parent
18e3659914
commit
023bd840fa
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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];
|
||||||
|
|
Loading…
Reference in New Issue