Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
fix(Metadata): check for number before type id defaults to -1 (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtormey authored and Sjors committed Apr 4, 2017
1 parent 20ec8f4 commit f5ba712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Metadata {
// encKeyBuffer :: Buffer (nullable = no encrypted save)
// TypeId :: Int (nullable = default -1)
this.VERSION = 1;
this._typeId = typeId || -1;
this._typeId = typeId == null ? -1 : typeId;
this._magicHash = null;
this._address = ecPair.getAddress();
this._signKey = ecPair;
Expand Down

0 comments on commit f5ba712

Please sign in to comment.