From 0d4baf7978b8e455c803711f31ba0c14f73f7fdb Mon Sep 17 00:00:00 2001 From: JiglioNero Date: Tue, 2 Jul 2024 16:04:10 +0200 Subject: [PATCH] check RootComponent.prototype for null --- CodePush.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodePush.js b/CodePush.js index 3c1338f28..2d1d9deda 100644 --- a/CodePush.js +++ b/CodePush.js @@ -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; }