Skip to content

Commit 9d6bd29

Browse files
committed
fix: use ?. to check if keyUtils.getPrivateKey exists
1 parent 84e094c commit 9d6bd29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashtx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ var DashTx = ("object" === typeof module && exports) || {};
250250
};
251251

252252
Tx.create = function (keyUtils) {
253-
if (!keyUtils.getPrivateKey) {
253+
if (!keyUtils?.getPrivateKey) {
254254
throw new Error(`you must create with 'opts.getPrivateKey()'`);
255255
}
256256

0 commit comments

Comments
 (0)