Skip to content

Commit

Permalink
Merge pull request #918 from bluekyu/main
Browse files Browse the repository at this point in the history
Fix validation error in requestRedraw
  • Loading branch information
chrfalch authored Sep 15, 2022
2 parents 3051967 + c89b03a commit 613c76b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/cpp/rnskia/RNSkJsiViewApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ class RNSkJsiViewApi : public JsiHostObject, public std::enable_shared_from_this
}

JSI_HOST_FUNCTION(requestRedraw) {
if (count < 2) {
if (count != 1) {
_platformContext->raiseError(
std::string("requestRedraw: Expected 2 arguments, got " + std::to_string(count) + "."));
std::string("requestRedraw: Expected 1 arguments, got " + std::to_string(count) + "."));

return jsi::Value::undefined();
}
Expand Down

0 comments on commit 613c76b

Please sign in to comment.