fix(forms): use strict runtimeType checks instead of instanceof
Currently, validators extending built-in validators are treated as built-in. This can result in an error when both a real built-in validator and a custom one are applied to the same element. Closes #6981
This commit is contained in:
@ -464,3 +464,7 @@ export function evalExpression(sourceUrl: string, expr: string, declarations: st
|
||||
export function isPrimitive(obj: any): boolean {
|
||||
return !isJsObject(obj);
|
||||
}
|
||||
|
||||
export function hasConstructor(value: Object, type: Type): boolean {
|
||||
return value.constructor === type;
|
||||
}
|
Reference in New Issue
Block a user