Skip to content

Commit 3705f2b

Browse files
authored
Merge pull request #2090 from Shopify/fix-example-regression
Fix minor regression in path.interpolate
2 parents a2145e3 + 92777da commit 3705f2b

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)