Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linting fix
  • Loading branch information
guybedford committed Sep 8, 2019
commit a9e9bb5cf519aaaf6bd0869be6f3bc9b56174a45
3 changes: 2 additions & 1 deletion src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,8 @@ Maybe<URL> PackageMainResolve(Environment* env,
Local<Object> exports_obj = exports.As<Object>();
Local<String> dot_string = String::NewFromUtf8(env->isolate(), ".",
v8::NewStringType::kNormal).ToLocalChecked();
target = exports_obj->Get(env->context(), dot_string).ToLocalChecked();
target =
exports_obj->Get(env->context(), dot_string).ToLocalChecked();
}
if (target->IsString()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to reuse the existing logic for string/array in PackageExportsResolve?

Copy link
Copy Markdown
Contributor Author

@guybedford guybedford Sep 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be better, it's just a refactoring I haven't had the time for. Would you be ok with moving that to a follow-up?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

Utf8Value target_utf8(isolate, target.As<v8::String>());
Expand Down