Skip to content

Commit 92777da

Browse files
committed
Fix minor regression in path.interpolate
1 parent 76b65d2 commit 92777da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package/cpp/api/JsiSkPath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ class JsiSkPath : public JsiSkWrappingSharedPtrHostObject<SkPath> {
494494
JSI_HOST_FUNCTION(interpolate) {
495495
auto path2 = JsiSkPath::fromValue(runtime, arguments[0]);
496496
auto weight = arguments[1].asNumber();
497-
if (count > 2) {
497+
if (count > 2 && !arguments[2].isUndefined()) {
498498
auto path3 = JsiSkPath::fromValue(runtime, arguments[2]);
499499
auto succeed = getObject()->interpolate(*path2, weight, path3.get());
500500
if (!succeed) {

0 commit comments

Comments
 (0)