Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index ea29d55709ca96df8c6f1cce99b9ad9bf19846e3..b9790eeb07252acb43488b15793d9efc56a4c68e 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -6072,8 +6072,9 @@ MaybeLocal<Object> Array::CloneElementAt(Local<Context> context, |
if (!paragon->IsJSObject()) return Local<Object>(); |
i::Handle<i::JSObject> paragon_handle(i::JSObject::cast(paragon)); |
Local<Object> result; |
- has_pending_exception = ToLocal<Object>( |
- isolate->factory()->CopyJSObject(paragon_handle), &result); |
+ has_pending_exception = |
+ !ToLocal<Object>(isolate->factory()->CopyJSObject(paragon_handle), |
+ &result); |
RETURN_ON_FAILED_EXECUTION(Object); |
RETURN_ESCAPED(result); |
} |