Skip to content

Commit

Permalink
check RootComponent.prototype for null
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov committed Jul 2, 2024
1 parent 2cb416e commit 0d4baf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CodePush.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ function codePushify(options = {}) {

// We can set ref property on class components only (not stateless)
// Check it by render method
if (RootComponent.prototype.render) {
if (RootComponent.prototype && RootComponent.prototype.render) {
props.ref = this.rootComponentRef;
}

Expand Down

0 comments on commit 0d4baf7

Please sign in to comment.