1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 22:33:11 +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, 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 {