Fix ESLint error
This commit is contained in:
parent
2ce5d925d0
commit
c2220c3654
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user