mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-02 22:33:11 +08:00
Remove update.json import in simpleUpdate
This commit is contained in:
@@ -12,10 +12,11 @@ import {
|
|||||||
downloadAndInstallApk,
|
downloadAndInstallApk,
|
||||||
} from './main';
|
} from './main';
|
||||||
|
|
||||||
import _updateConfig from '../../../update.json';
|
export function simpleUpdate(WrappedComponent, options = {}) {
|
||||||
const { appKey } = _updateConfig[Platform.OS];
|
const { appKey } = options;
|
||||||
|
if (!appKey) {
|
||||||
export function simpleUpdate(WrappedComponent) {
|
throw new Error('appKey is required for simpleUpdate()');
|
||||||
|
}
|
||||||
return __DEV__
|
return __DEV__
|
||||||
? WrappedComponent
|
? WrappedComponent
|
||||||
: class AppUpdate extends Component {
|
: class AppUpdate extends Component {
|
||||||
|
|||||||
Reference in New Issue
Block a user