Skip to content

Commit 4eaa14c

Browse files
committed
chore: use .asNumber() instead of getValue<T>
1 parent 8041ed1 commit 4eaa14c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • packages/react-native-executorch/common/rnexecutorch/host_objects

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ inline JsiTensorView getValue<JsiTensorView>(const jsi::Value &val,
4545
jsi::Object obj = val.asObject(runtime);
4646
JsiTensorView tensorView;
4747

48-
int scalarTypeInt =
49-
getValue<int>(obj.getProperty(runtime, "scalarType"), runtime);
48+
int scalarTypeInt = obj.getProperty(runtime, "scalarType").asNumber();
5049
tensorView.scalarType = static_cast<ScalarType>(scalarTypeInt);
5150

5251
jsi::Value shapeValue = obj.getProperty(runtime, "shape");

0 commit comments

Comments
 (0)