From a7a0f86a73ab51be31fb2c3205612d7ff1fb5384 Mon Sep 17 00:00:00 2001 From: John Porto Date: Sun, 17 Apr 2022 11:53:12 -0700 Subject: [PATCH] Fix typo in Value's constructor with a Symbol Summary: The current JSI implementation is converting a Symbol to String when creating a jsi Value. Changelog: [General][Fixed] Reviewed By: neildhar Differential Revision: D35705825 fbshipit-source-id: 3bee0a02bb77643c6a33031b4d98ac9a7e126303 --- ReactCommon/jsi/jsi/jsi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/jsi/jsi/jsi.h b/ReactCommon/jsi/jsi/jsi.h index 9c86ca39a49..56884908b6d 100644 --- a/ReactCommon/jsi/jsi/jsi.h +++ b/ReactCommon/jsi/jsi/jsi.h @@ -992,7 +992,7 @@ class JSI_EXPORT Value { /// Copies a Symbol lvalue into a new JS value. Value(Runtime& runtime, const Symbol& sym) : Value(SymbolKind) { - new (&data_.pointer) String(runtime.cloneSymbol(sym.ptr_)); + new (&data_.pointer) Symbol(runtime.cloneSymbol(sym.ptr_)); } /// Copies a String lvalue into a new JS value.