Fix depth

This commit is contained in:
shamoon 2024-09-04 23:09:26 -07:00
parent 5a2901b7ee
commit d52e832140

View File

@ -246,12 +246,14 @@ export class CustomFieldQueryExpression extends CustomFieldQueryElement {
this._value = values.map((value) => { this._value = values.map((value) => {
if (value.length === 3) { if (value.length === 3) {
const atom = new CustomFieldQueryAtom(value) const atom = new CustomFieldQueryAtom(value)
atom.depth = this.depth + 1
atom.changed.subscribe(() => { atom.changed.subscribe(() => {
this.changed.next(this) this.changed.next(this)
}) })
return atom return atom
} else { } else {
const expression = new CustomFieldQueryExpression(value) const expression = new CustomFieldQueryExpression(value)
expression.depth = this.depth + 1
expression.changed.subscribe(() => { expression.changed.subscribe(() => {
this.changed.next(this) this.changed.next(this)
}) })