@react-native-kakao/user 1.3.0 → 1.4.0

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.
@@ -41,11 +41,11 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
41
41
  scopes: ReadableArray?,
42
42
  promise: Promise,
43
43
  ) = onMain {
44
- val context = currentActivity
45
- if (context == null) {
46
- promise.rejectWith(ActivityNotFoundException())
47
- return@onMain
48
- }
44
+ val context =
45
+ currentActivity ?: run {
46
+ promise.rejectWith(ActivityNotFoundException())
47
+ return@onMain
48
+ }
49
49
  val callback: (OAuthToken?, Throwable?) -> Unit = { token, error ->
50
50
  if (error != null) {
51
51
  promise.rejectWith(error)
@@ -67,7 +67,7 @@ import RNCKakaoCore
67
67
  .loginWithKakaoTalk(serviceTerms: emptyArrayToNil(serviceTerms), completion: callback)
68
68
  } else {
69
69
  var _prompts: [Prompt] = []
70
- prompts.forEach { p in
70
+ for p in prompts {
71
71
  if p == "Login" { _prompts.append(.Login) }
72
72
  if p == "Cert" { _prompts.append(.Cert) }
73
73
  if p == "Create" { _prompts.append(.Create) }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-kakao/user",
3
3
  "description": "React Native Kakao User SDK",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
7
7
  "types": "lib/typescript/src/index.d.ts",
@@ -62,7 +62,7 @@
62
62
  "access": "public"
63
63
  },
64
64
  "devDependencies": {
65
- "@react-native-kakao/core": "^1.3.0",
65
+ "@react-native-kakao/core": "^1.4.0",
66
66
  "@types/invariant": "^2",
67
67
  "@types/jest": "^29.5.5",
68
68
  "@types/react": "^18.2.44",
@@ -74,7 +74,7 @@
74
74
  "typescript": "5.1.6"
75
75
  },
76
76
  "peerDependencies": {
77
- "@react-native-kakao/core": "^1.3.0",
77
+ "@react-native-kakao/core": "^1.4.0",
78
78
  "react": "*",
79
79
  "react-native": "*"
80
80
  },
@@ -110,7 +110,7 @@
110
110
  "javaPackageName": "net.mjstudio.rnkakao.user"
111
111
  }
112
112
  },
113
- "gitHead": "04bb32e6fbbcedf020894aee18c056abf1bc8d6f",
113
+ "gitHead": "2813f27bace3518a32901c232b80e8fbf9398e51",
114
114
  "dependencies": {
115
115
  "@mj-studio/js-util": "^1.0.34"
116
116
  }