mirror of https://github.com/embarklabs/embark.git
Adding default callback
This commit is contained in:
parent
e8b2837c93
commit
6c4250dd44
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue