We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bea58a1 commit cbb274bCopy full SHA for cbb274b
lib/internal/async_hooks.js
@@ -179,11 +179,8 @@ function fatalError(e) {
179
function lookupPublicResource(resource) {
180
if (typeof resource !== 'object' || resource === null) return resource;
181
182
- const publicResource = resource[owner_symbol];
183
-
184
- if (publicResource != null) {
185
- return publicResource;
186
- }
+ let owner;
+ while ((owner = resource[owner_symbol]) != null) resource = owner;
187
188
return resource;
189
}
0 commit comments