mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
fix(require): tryPackage uses optional chaining (#16020)
This commit is contained in:
parent
a2262c11d7
commit
075bdfd621
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@
|
|||
requestPath,
|
||||
"package.json",
|
||||
);
|
||||
const pkg = core.ops.op_require_read_package_scope(packageJsonPath).main;
|
||||
const pkg = core.ops.op_require_read_package_scope(packageJsonPath)?.main;
|
||||
if (!pkg) {
|
||||
return tryExtensions(
|
||||
pathResolve(requestPath, "index"),
|
||||
|
|
Loading…
Reference in a new issue