Hierarchy clone fix (#1936)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-05-30 22:00:25 +06:00 committed by GitHub
parent df9115b75a
commit fba7cfb113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -423,8 +423,7 @@ export class Hierarchy {
const type = {}.toString.call(value).slice(8, -1)
if (type === 'Array') {
result[key] = this.clone(value)
}
if (type === 'Object') {
} else if (type === 'Object') {
const m = Hierarchy.mixinClass(value)
const valClone = this.clone(value)
result[key] = m !== undefined ? this.as(valClone, m) : valClone

View File

@ -27,7 +27,6 @@
const client = getClient()
query.query(core.class.Enum, {}, (res) => {
console.log(res)
enums = res
if (selected !== undefined) {
selected = enums.find((p) => p._id === selected?._id)