| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3559471 commit 48035a2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,17 +48,11 @@ static MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context, | |||
| 48 | 48 | Local<Array> trace) { | |
| 49 | 49 | Environment* env = Environment::GetCurrent(context); | |
| 50 | 50 | if (env == nullptr) { | |
| 51 | - MaybeLocal<String> s = exception->ToString(context); | ||
| 52 | - return s.IsEmpty() ? | ||
| 53 | - MaybeLocal<Value>() : | ||
| 54 | - MaybeLocal<Value>(s.ToLocalChecked()); | ||
| 51 | + return exception->ToString(context).FromMaybe(Local<Value>()); | ||
| 55 | 52 | } | |
| 56 | 53 | Local<Function> prepare = env->prepare_stack_trace_callback(); | |
| 57 | 54 | if (prepare.IsEmpty()) { | |
| 58 | - MaybeLocal<String> s = exception->ToString(context); | ||
| 59 | - return s.IsEmpty() ? | ||
| 60 | - MaybeLocal<Value>() : | ||
| 61 | - MaybeLocal<Value>(s.ToLocalChecked()); | ||
| 55 | + return exception->ToString(context).FromMaybe(Local<Value>()); | ||
| 62 | 56 | } | |
| 63 | 57 | Local<Value> args[] = { | |
| 64 | 58 | context->Global(), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments