From 7d6809b57fe3f8c52253e5b02b057b5cb45eae5c Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 15 Sep 2018 12:52:11 -0400 Subject: [PATCH 1/3] take into account when event does not trigger a cb --- lib/modules/ens/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index bef34d59f..85b182ed7 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -33,7 +33,11 @@ class ENS { this.events.setCommandHandler("storage:ens:associate", this.associateStorageToEns.bind(this)); } - setProviderAndRegisterDomains(cb) { + setProviderAndRegisterDomains(_cb) { + let cb = _cb + if (!cb) { + cb = function() {} + } const self = this; async.parallel([ function getENSRegistry(paraCb) { From 1296545fa3174225fb86b38e1d5041550e2b6c9c Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 17 Sep 2018 13:36:20 -0400 Subject: [PATCH 2/3] make function defaul arg instead --- lib/modules/ens/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index 85b182ed7..7329f04d5 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -33,11 +33,7 @@ class ENS { this.events.setCommandHandler("storage:ens:associate", this.associateStorageToEns.bind(this)); } - setProviderAndRegisterDomains(_cb) { - let cb = _cb - if (!cb) { - cb = function() {} - } + setProviderAndRegisterDomains(cb = (()=>{})) { const self = this; async.parallel([ function getENSRegistry(paraCb) { From c02bd6c4446dec9dfd5362f5616eeff5ab971f98 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 17 Sep 2018 13:58:13 -0400 Subject: [PATCH 3/3] make linter happy --- lib/modules/ens/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index 7329f04d5..5339e6d07 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -33,7 +33,7 @@ class ENS { this.events.setCommandHandler("storage:ens:associate", this.associateStorageToEns.bind(this)); } - setProviderAndRegisterDomains(cb = (()=>{})) { + setProviderAndRegisterDomains(cb = (() => {})) { const self = this; async.parallel([ function getENSRegistry(paraCb) {