mirror of https://github.com/embarklabs/embark.git
make config params optional
This commit is contained in:
parent
402ee19722
commit
edbbaa160b
|
@ -121,6 +121,10 @@ class Test {
|
||||||
|
|
||||||
config(options, callback) {
|
config(options, callback) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
if (typeof(options) === 'function') {
|
||||||
|
callback = options;
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
callback = function () {
|
callback = function () {
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
const SimpleStorage = embark.require('Embark/contracts/SimpleStorage');
|
const SimpleStorage = embark.require('Embark/contracts/SimpleStorage');
|
||||||
let accounts;
|
let accounts;
|
||||||
|
|
||||||
config({}, (err, theAccounts) => {
|
config((err, theAccounts) => {
|
||||||
accounts = theAccounts;
|
accounts = theAccounts;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue