fix(ivy): host listeners being inherited twice (#28902)

Fixes inherited host event listeners being registered twice.

This PR resolves FW-1071.

PR Close #28902
This commit is contained in:
Kristiyan Kostadinov
2019-02-21 22:45:37 +01:00
committed by Ben Lesh
parent 9dac04ff50
commit 43181ea568
4 changed files with 70 additions and 5 deletions

View File

@ -210,6 +210,13 @@ export class ReflectionCapabilities implements PlatformReflectionCapabilities {
return propMetadata;
}
ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {
if (!isType(typeOrFunc)) {
return {};
}
return this._ownPropMetadata(typeOrFunc, Object) || {};
}
hasLifecycleHook(type: any, lcProperty: string): boolean {
return type instanceof Type && lcProperty in type.prototype;
}