fix: some bug

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2022-07-06 21:57:36 +08:00
parent b6d7847a79
commit d8d03149df
5 changed files with 29 additions and 17 deletions

View File

@ -54,6 +54,7 @@ class Reflect {
}
}
if (!field) throw new Error(`can't reflect field ${typeof nameOrIndex == "number" ? 'index' : 'name'} ${nameOrIndex} from ${this.class.getName()}!`)
fieldCache.set(key, field)
return accessible(field)
}