Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit 7c16016

Browse files
author
Face Kapow
committed
Code fix
1 parent 0562cb0 commit 7c16016

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/modules/dns.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ const lookup = (hostname, optsOpt, cb) => {
7777
return;
7878
}
7979
const ret = [];
80-
for (const i of Object.keys(data.results)) {
80+
for (const i of [...data.results.keys()])) {
8181
const res = data.results[i];
8282
if (!opts.all && i === 0) {
8383
const addr = res.address.join('.');
8484
if (cb) cb(null, addr, 4);
85-
break;
85+
return;
8686
} else {
8787
switch (res.record) {
8888
case 'A':

0 commit comments

Comments
 (0)