Adding default callback

This commit is contained in:
Anthony Laibe 2018-07-30 12:52:48 +01:00 committed by Iuri Matias
parent d6849bf04f
commit 65edc47187
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,5 @@
/*global __embarkIPFS*/
const NoConnectionError = 'No IPFS connection. Please ensure to call Embark.Names.setProvider()';
const NotAvailableError = 'Not available with ipns';
@ -21,6 +20,7 @@ __embarkIPFS.resolve = function (name, callback) {
};
__embarkIPFS.register = function(addr, callback) {
callback = callback || function () {};
if (!this._ipfsConnection) {
return new Error(NoConnectionError);
}

View File

@ -21,7 +21,7 @@ class App extends React.Component {
activeKey: 1,
whisperEnabled: false,
storageEnabled: false,
ensEnabled: false,
ensEnabled: false
};
}