Skip to content

Commit 54a3454

Browse files
authored
fix: skia crash (#27)
1 parent 2143191 commit 54a3454

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/react-native-reanimated/Common/cpp/worklets/SharedItems

packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jsi::Value makeShareableClone(
5656
if (value.isObject()) {
5757
auto object = value.asObject(rt);
5858
jsi::PropNameID prop = workletCodePropName(rt);
59-
if (object.hasProperty(rt, prop)) {
59+
if (object.hasProperty(rt, prop) && object.getPropertyNames(rt).length(rt) == 0) {
6060
jsi::Value code = object.getProperty(rt, prop);
6161
shareable = std::make_shared<ShareableString>(code.asString(rt).utf8(rt));
6262
} else if (!object.getProperty(rt, "__workletHash").isUndefined()) {

0 commit comments

Comments
 (0)