This repository was archived by the owner on Jan 24, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { NativeModules , Platform } from 'react-native' ;
3- var invariant = require ( 'invariant' ) ;
4- var RNCookieManagerIOS = NativeModules . RNCookieManagerIOS ;
5- var RNCookieManagerAndroid = NativeModules . RNCookieManagerAndroid ;
3+ const invariant = require ( 'invariant' ) ;
4+ const RNCookieManagerIOS = NativeModules . RNCookieManagerIOS ;
5+ const RNCookieManagerAndroid = NativeModules . RNCookieManagerAndroid ;
6+
7+ let CookieManager ;
68
7- var CookieManager ;
89if ( Platform . OS === 'ios' ) {
910 invariant ( RNCookieManagerIOS ,
10- 'Add RNCookieMangerIOS.h and RNCookieManagerIOS.m to your Xcode project' ) ;
11+ 'Add RNCookieMangerIOS.h and RNCookieManagerIOS.m to your Xcode project' ) ;
1112 CookieManager = RNCookieManagerIOS ;
1213} else if ( Platform . OS === 'android' ) {
13- invariant ( RNCookieManagerAndroid , 'Import libraries to android "rnpm link"' ) ;
14+ invariant ( RNCookieManagerAndroid ,
15+ 'Import libraries to android "rnpm link"' ) ;
1416 CookieManager = RNCookieManagerAndroid ;
1517} else {
16- invariant ( CookieManager , " Invalid platform" ) ;
18+ invariant ( CookieManager , ' Invalid platform. This library only supports Android and iOS.' ) ;
1719}
1820
1921var functions = [
You can’t perform that action at this time.
0 commit comments