Skip to content

Commit edf2008

Browse files
reafactor: use ScalarType enum instead of magic number in jsi conversions
1 parent 01b7083 commit edf2008

File tree

1 file changed

+2
-1
lines changed
  • packages/react-native-executorch/common/rnexecutorch/host_objects

1 file changed

+2
-1
lines changed

packages/react-native-executorch/common/rnexecutorch/host_objects/JsiConversions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ getJsiValue(const models::style_transfer::PixelDataResult &result,
578578
sizesArray.setValueAtIndex(runtime, 2, jsi::Value(4));
579579
obj.setProperty(runtime, "sizes", sizesArray);
580580

581-
obj.setProperty(runtime, "scalarType", jsi::Value(0));
581+
obj.setProperty(runtime, "scalarType",
582+
jsi::Value(static_cast<int32_t>(ScalarType::Byte)));
582583

583584
return obj;
584585
}

0 commit comments

Comments
 (0)