From 069e9d7d3850cb47e2c5c399d9dff9288a846c40 Mon Sep 17 00:00:00 2001 From: Jeepeng Date: Mon, 7 Aug 2017 18:17:21 +0800 Subject: [PATCH] Fixed issue when account = null --- index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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": {