Skip to content

Commit

Permalink
fix(🐯): fix minor parameter bug in drawSvg() (Shopify#2811)
Browse files Browse the repository at this point in the history
undefined values for with and weight weren't accepted.
  • Loading branch information
wcandillon authored Dec 16, 2024
1 parent 7511466 commit bd526a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/skia/cpp/api/JsiSkCanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class JsiSkCanvas : public JsiSkHostObject {

JSI_HOST_FUNCTION(drawSvg) {
auto svgdom = JsiSkSVG::fromValue(runtime, arguments[0]);
if (count == 3) {
if (count == 3 && arguments[1].isNumber() && arguments[2].isNumber()) {
// read size
auto w = arguments[1].asNumber();
auto h = arguments[2].asNumber();
Expand Down

0 comments on commit bd526a5

Please sign in to comment.