Skip to content

Commit 0f5dabe

Browse files
committed
dns: name generated functions
PR-URL: #14518 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 732658e commit 0f5dabe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/dns.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class Resolver {
254254
}
255255

256256
function resolver(bindingName) {
257-
return function query(name, /* options, */ callback) {
257+
function query(name, /* options, */ callback) {
258258
var options;
259259
if (arguments.length > 2) {
260260
options = callback;
@@ -277,7 +277,9 @@ function resolver(bindingName) {
277277
var err = this._handle[bindingName](req, name);
278278
if (err) throw errnoException(err, bindingName);
279279
return req;
280-
};
280+
}
281+
Object.defineProperty(query, 'name', { value: bindingName });
282+
return query;
281283
}
282284

283285
var resolveMap = Object.create(null);

0 commit comments

Comments
 (0)