AccountId20.eq should not fail on null/undefined (#5560)

* AccountId20.eq should not fail on null/undefined

* CHANGELOG
This commit is contained in:
Jaco
2023-03-23 12:34:29 +02:00
committed by GitHub
parent 4f7f7769be
commit b80a28f65d
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ export class GenericEthereumAccountId extends U8aFixed {
* @description Compares the value of the input to see if there is a match
*/
public override eq (other?: unknown): boolean {
return super.eq(decodeAccountId(other as AnyU8a));
return !!other && super.eq(decodeAccountId(other as AnyU8a));
}
/**