1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 12:11:39 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Remove update.json import in simpleUpdate

This commit is contained in:
sunnylqm
2022-07-04 18:14:51 +08:00
parent 91f877dc6d
commit 736699a922

View File

@@ -12,10 +12,11 @@ import {
downloadAndInstallApk,
} from './main';
import _updateConfig from '../../../update.json';
const { appKey } = _updateConfig[Platform.OS];
export function simpleUpdate(WrappedComponent) {
export function simpleUpdate(WrappedComponent, options = {}) {
const { appKey } = options;
if (!appKey) {
throw new Error('appKey is required for simpleUpdate()');
}
return __DEV__
? WrappedComponent
: class AppUpdate extends Component {