Adding default callback

This commit is contained in:
Anthony Laibe 2018-07-30 12:52:48 +01:00
parent e8b2837c93
commit 6c4250dd44
2 changed files with 2 additions and 2 deletions

View File

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

View File

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