diff options
Diffstat (limited to 'ext/node/ops/require.rs')
-rw-r--r-- | ext/node/ops/require.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index 87b75c88c..f758ec973 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -371,7 +371,8 @@ where &Url::from_file_path(parent_path.unwrap()).unwrap(), permissions, ) - .ok(); + .ok() + .flatten(); if pkg.is_none() { return Ok(None); } @@ -499,7 +500,7 @@ where fn op_require_read_closest_package_json<P>( state: &mut OpState, filename: String, -) -> Result<PackageJson, AnyError> +) -> Result<Option<PackageJson>, AnyError> where P: NodePermissions + 'static, { |