Use Object.getPrototypeOf instead of obj.__proto__
This commit is contained in:
parent
05946ee342
commit
4ea534293b
@ -60,7 +60,7 @@ function ensureMethod<Context>(
|
|||||||
export function getValidatorsForInstance<Context>(
|
export function getValidatorsForInstance<Context>(
|
||||||
target: any,
|
target: any,
|
||||||
): Array<Validate<Context>> {
|
): Array<Validate<Context>> {
|
||||||
return getValidatorsForClass(target.__proto__.constructor)
|
return getValidatorsForClass(Object.getPrototypeOf(target).constructor)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getValidatorsForClass<Context>(
|
export function getValidatorsForClass<Context>(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user