From c2220c3654e58572b3e694b6b5c0455abc0ce808 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 7 May 2020 09:27:15 +0200 Subject: [PATCH] Fix ESLint error --- lib/utils/ipfs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/ipfs.js b/lib/utils/ipfs.js index 6e306de..18b17d4 100644 --- a/lib/utils/ipfs.js +++ b/lib/utils/ipfs.js @@ -36,7 +36,7 @@ class IPFS { cat (hashData) { let ipfsHash = hashData; // default - if it is a string - if (hashData.hasOwnProperty('hashSize')) { + if (Object.prototype.hasOwnProperty.call(hashData, 'hashSize')) { ipfsHash = this.encodeHash(hashData); } if (this._config['gatewayUrl']) { @@ -48,7 +48,7 @@ class IPFS { pin (hashData) { let ipfsHash = hashData; // default - if it is a string - if (hashData.hasOwnProperty('hashSize')) { + if (Object.prototype.hasOwnProperty.call(hashData, 'hashSize')) { ipfsHash = this.encodeHash(hashData); } return this._ipfsAPI.pin.add(multihashes.toB58String(ipfsHash));