Fix moment is compact again (#1201)

This commit is contained in:
Amaury Martiny
2019-07-26 15:54:50 +02:00
committed by Jaco Greeff
parent 70bc823d25
commit 894f07e3c9
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -99,6 +99,7 @@ export interface InterfaceRegistry {
'Option<Method>': Option<Method>;
'Vec<Method>': Vec<Method>;
Moment: Moment;
'Compact<Moment>': Compact<Moment>;
'Option<Moment>': Option<Moment>;
'Vec<Moment>': Vec<Moment>;
Null: Null;
@@ -564,6 +565,7 @@ export interface InterfaceRegistry {
'Option<Exposure>': Option<Exposure>;
'Vec<Exposure>': Vec<Exposure>;
MomentOf: MomentOf;
'Compact<MomentOf>': Compact<MomentOf>;
'Option<MomentOf>': Option<MomentOf>;
'Vec<MomentOf>': Vec<MomentOf>;
RewardDestination: RewardDestination;
+1 -1
View File
@@ -60,7 +60,7 @@ function setImports ({ codecTypes, localTypes, ownTypes, primitiveTypes }: TypeI
function isChildClass (Parent: Constructor<any>, Child: Constructor<any>): boolean {
// https://stackoverflow.com/questions/30993434/check-if-a-constructor-inherits-another-in-es6/30993664
// eslint-disable-next-line no-prototype-builtins
return Parent.isPrototypeOf(Child);
return Parent === Child || Parent.isPrototypeOf(Child);
}
function isCompactEncodable (Child: Constructor<any>): boolean {