Skip to content

Commit

Permalink
Merge pull request #80 from Shopify/bugfix/79-fix-redundant-asobject-…
Browse files Browse the repository at this point in the history
…call

Fix calling asObject twice for JsiSkRect::fromValue conversion
  • Loading branch information
chrfalch authored Jan 4, 2022
2 parents b3aa302 + 21819ed commit bd626a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/cpp/api/JsiSkRect.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class JsiSkRect : public JsiSkWrappingSharedPtrHostObject<SkRect> {
const jsi::Value &obj) {
const auto object = obj.asObject(runtime);
if (object.isHostObject(runtime)) {
return obj.asObject(runtime)
return object
.asHostObject<JsiSkRect>(runtime)
.get()
->getObject();
Expand Down

0 comments on commit bd626a7

Please sign in to comment.