Skip null values (not just undefined) when resolving ENS names.

This commit is contained in:
Richard Moore 2018-06-24 18:56:45 -04:00
parent 1d2fe8993b
commit c348c60d5c
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
5 changed files with 5 additions and 5 deletions

2
dist/ethers.js vendored

@ -11458,7 +11458,7 @@ var Provider = /** @class */ (function () {
var promises = [];
var result = properties_1.shallowCopy(object);
keys.forEach(function (key) {
if (result[key] === undefined) {
if (result[key] == null) {
return;
}
promises.push(this.resolveName(result[key]).then(function (address) {

2
dist/ethers.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -962,7 +962,7 @@ var Provider = /** @class */ (function () {
var promises = [];
var result = properties_1.shallowCopy(object);
keys.forEach(function (key) {
if (result[key] === undefined) {
if (result[key] == null) {
return;
}
promises.push(this.resolveName(result[key]).then(function (address) {

@ -1120,7 +1120,7 @@ export class Provider {
var result: { [key: string ]: string } = shallowCopy(object);
keys.forEach(function(key) {
if (result[key] === undefined) { return; }
if (result[key] == null) { return; }
promises.push(this.resolveName(result[key]).then((address: string) => {
result[key] = address;
}));