This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import requestFetchAdapter from "./request-fetch-adapter";
4
4
import { AppState , Platform } from "react-native" ;
5
5
import RestartManager from "./RestartManager" ;
6
6
import log from "./logging" ;
7
+ import hoistStatics from 'hoist-non-react-statics' ;
7
8
8
9
let NativeCodePush = require ( "react-native" ) . NativeModules . CodePush ;
9
10
const PackageMixins = require ( "./package-mixins" ) ( NativeCodePush ) ;
@@ -451,7 +452,7 @@ function codePushify(options = {}) {
451
452
}
452
453
453
454
var decorator = ( RootComponent ) => {
454
- return class CodePushComponent extends React . Component {
455
+ const extended = class CodePushComponent extends React . Component {
455
456
componentDidMount ( ) {
456
457
if ( options . checkFrequency === CodePush . CheckFrequency . MANUAL ) {
457
458
CodePush . notifyAppReady ( ) ;
@@ -503,6 +504,8 @@ function codePushify(options = {}) {
503
504
return < RootComponent { ...props } />
504
505
}
505
506
}
507
+
508
+ return hoistStatics ( extended , RootComponent ) ;
506
509
}
507
510
508
511
if ( typeof options === "function" ) {
Original file line number Diff line number Diff line change 19
19
"dependencies" : {
20
20
"code-push" : " 1.11.2-beta" ,
21
21
"glob" : " ^5.0.15" ,
22
+ "hoist-non-react-statics" : " ^2.3.1" ,
22
23
"inquirer" : " 1.1.2" ,
23
24
"plist" : " 1.2.0" ,
24
25
"xcode" : " 0.9.2"
You can’t perform that action at this time.
0 commit comments