mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-22 10:28:34 +00:00
fix(@embark/ens): don't break when determining contract addresses
Turns out that, when Embark tries to replace ENS subdomains, it would fail if `subdomains` aren't defined in the namesystem configuration. This commit adds a safeguard so that not defining `subdomains` is fine.
This commit is contained in:
parent
3f4e12aa0f
commit
0d20cb5d86
@ -180,7 +180,7 @@ class ENS {
|
||||
return cb();
|
||||
}
|
||||
|
||||
await Promise.all(Object.keys(this.config.namesystemConfig.register.subdomains).map((subDomainName) => {
|
||||
await Promise.all(Object.keys(this.config.namesystemConfig.register.subdomains || {}).map((subDomainName) => {
|
||||
return new Promise(async (resolve, _reject) => {
|
||||
const address = this.config.namesystemConfig.register.subdomains[subDomainName];
|
||||
const directivesRegExp = new RegExp(/\$(\w+\[?\d?\]?)/g);
|
||||
|
Loading…
x
Reference in New Issue
Block a user