| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f1488bb commit f9d0166
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1187,11 +1187,10 @@ Local<Value> MakeCallback(Environment* env, | |||
| 1187 | 1187 | } | |
| 1188 | 1188 | ||
| 1189 | 1189 | if (ret.IsEmpty()) { | |
| 1190 | - if (callback_scope.in_makecallback()) | ||
| 1191 | - return ret; | ||
| 1192 | - // NOTE: Undefined() is returned here for backwards compatibility. | ||
| 1193 | - else | ||
| 1194 | - return Undefined(env->isolate()); | ||
| 1190 | + // NOTE: For backwards compatibility with public API we return Undefined() | ||
| 1191 | + // if the top level call threw. | ||
| 1192 | + return callback_scope.in_makecallback() ? | ||
| 1193 | + ret : Undefined(env->isolate()).As<Value>(); | ||
| 1195 | 1194 | } | |
| 1196 | 1195 | ||
| 1197 | 1196 | if (has_domain) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments