make config params optional

This commit is contained in:
Iuri Matias 2018-06-07 20:11:49 -04:00
parent 402ee19722
commit edbbaa160b
2 changed files with 5 additions and 1 deletions

View File

@ -121,6 +121,10 @@ class Test {
config(options, callback) {
const self = this;
if (typeof(options) === 'function') {
callback = options;
options = {};
}
if (!callback) {
callback = function () {
};

View File

@ -2,7 +2,7 @@
const SimpleStorage = embark.require('Embark/contracts/SimpleStorage');
let accounts;
config({}, (err, theAccounts) => {
config((err, theAccounts) => {
accounts = theAccounts;
});