@sentiance-react-native/user-context 6.0.0-beta.13 → 6.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/lib/user-context.js +6 -4
- package/package.json +2 -2
package/lib/index.js
CHANGED
package/lib/user-context.js
CHANGED
|
@@ -5,23 +5,25 @@ const {SentianceUserContext, SentianceCore} = NativeModules;
|
|
|
5
5
|
const SDK_USER_CONTEXT_UPDATE_EVENT = "SENTIANCE_USER_CONTEXT_UPDATE_EVENT";
|
|
6
6
|
|
|
7
7
|
let didLocateNativeModule = true;
|
|
8
|
-
|
|
8
|
+
let userContextModule = {};
|
|
9
9
|
if (Platform.OS === 'android') {
|
|
10
10
|
if (!SentianceUserContext) {
|
|
11
11
|
didLocateNativeModule = false;
|
|
12
12
|
const nativeModuleName = varToString({SentianceUserContext});
|
|
13
13
|
console.error(`Could not locate the native ${nativeModuleName} module.
|
|
14
14
|
Make sure that your native code is properly linked, and that the module name you specified is correct.`);
|
|
15
|
+
} else {
|
|
16
|
+
userContextModule = SentianceUserContext
|
|
15
17
|
}
|
|
16
|
-
userContextModule = SentianceUserContext
|
|
17
18
|
} else {
|
|
18
19
|
if (!SentianceCore) {
|
|
19
20
|
didLocateNativeModule = false;
|
|
20
21
|
const nativeModuleName = varToString({SentianceCore});
|
|
21
22
|
console.error(`Could not locate the native ${nativeModuleName} module.
|
|
22
23
|
Make sure that your native code is properly linked, and that the module name you specified is correct.`);
|
|
24
|
+
} else {
|
|
25
|
+
userContextModule = SentianceCore
|
|
23
26
|
}
|
|
24
|
-
userContextModule = SentianceCore
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
if (didLocateNativeModule) {
|
|
@@ -35,4 +37,4 @@ if (didLocateNativeModule) {
|
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
module.exports = userContextModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentiance-react-native/user-context",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.16",
|
|
4
4
|
"description": "React Native Sentiance - This module provides an easy API to add user context awareness into your apps.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"sentiance"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@sentiance-react-native/core": "6.0.0-beta.
|
|
17
|
+
"@sentiance-react-native/core": "6.0.0-beta.16"
|
|
18
18
|
},
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "",
|