fix(@embark/embarkjs-ipfs): use `version()` API instead of `id()` to determine availability

This commit is contained in:
Pascal Precht 2019-08-08 11:01:40 +02:00 committed by Michael Bradley
parent f7f54f299d
commit 1595e4b37f
1 changed files with 3 additions and 3 deletions

View File

@ -37,9 +37,9 @@ __embarkIPFS.isAvailable = function () {
if (!this._ipfsConnection) {
return resolve(false);
}
this._ipfsConnection.id()
.then((id) => {
resolve(Boolean(id));
this._ipfsConnection.version()
.then((version) => {
resolve(Boolean(version));
})
.catch((err) => {
console.error(err);