diff --git a/index.js b/index.js index 5353af8..754cdfe 100644 --- a/index.js +++ b/index.js @@ -41,7 +41,7 @@ class XGPush { static register(account) { if (Platform.OS === 'ios') { - XGPushManager.setAccount(account); + !!account && XGPushManager.setAccount(account); return XGPushManager.requestPermissions({ alert: true, badge: true, diff --git a/package.json b/package.json index 6721f5b..a2bc8a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-xinge-push", - "version": "0.2.1", + "version": "0.2.2", "description": "Xinge push for react-native", "main": "index.js", "scripts": {