From c91285613839e8546941442a19068c08d09d3d2c Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Wed, 7 Aug 2024 18:14:45 +0400 Subject: [PATCH] Fix caml_obj after review --- jscomp/runtime/caml_obj.res | 2 +- lib/es6/caml_obj.js | 4 ++-- lib/js/caml_obj.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jscomp/runtime/caml_obj.res b/jscomp/runtime/caml_obj.res index 2a8e97381b..438e880a51 100644 --- a/jscomp/runtime/caml_obj.res +++ b/jscomp/runtime/caml_obj.res @@ -327,7 +327,7 @@ let rec equal = (a: Obj.t, b: Obj.t): bool => let a: {..} = Obj.magic(a) let b: {..} = Obj.magic(b) if %raw(`b instanceof Error`) && a["message"] === b["message"] { - equal(a["clause"], b["clause"]) + equal(a["cause"], b["cause"]) } else { false } diff --git a/lib/es6/caml_obj.js b/lib/es6/caml_obj.js index 2e8803446f..9b3515d31e 100644 --- a/lib/es6/caml_obj.js +++ b/lib/es6/caml_obj.js @@ -320,8 +320,8 @@ function equal(_a, _b) { if (!((b instanceof Error) && a.message === b.message)) { return false; } - _b = b.clause; - _a = a.clause; + _b = b.cause; + _a = a.cause; continue; }; } diff --git a/lib/js/caml_obj.js b/lib/js/caml_obj.js index 4790664222..b545a4ab99 100644 --- a/lib/js/caml_obj.js +++ b/lib/js/caml_obj.js @@ -320,8 +320,8 @@ function equal(_a, _b) { if (!((b instanceof Error) && a.message === b.message)) { return false; } - _b = b.clause; - _a = a.clause; + _b = b.cause; + _a = a.cause; continue; }; }