Skip to content

Commit

Permalink
fixup! module: use optional chaining in cjs/loader.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RaisinTen committed Feb 5, 2021
1 parent f881ec5 commit 5abd9c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ Module._resolveFilename = function(request, parent, isMain, options) {
if (parent?.filename) {
if (request[0] === '#') {
const pkg = readPackageScope(parent.filename) || {};
if (pkg.data?.imports != null)
if (pkg.data?.imports != null) {
try {
return finalizeEsmResolution(
packageImportsResolve(request, pathToFileURL(parent.filename),
Expand Down

0 comments on commit 5abd9c2

Please sign in to comment.