Skip to content

Commit

Permalink
fix: crush when import nonexits module in some cases (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeelyChau authored Aug 19, 2020
1 parent e192ca5 commit a6ec4c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/boa/src/core/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Napi::Value PythonNode::Import(const CallbackInfo &info) {
return PythonObject::NewInstance(info.Env(), obj);
} catch (pybind::error_already_set &e) {
Napi::TypeError::New(info.Env(), e.what()).ThrowAsJavaScriptException();
return info.Env().Undefined();
}
}

Expand Down

0 comments on commit a6ec4c7

Please sign in to comment.