react-native-orientation-director 3.0.1 → 3.0.2

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.
@@ -50,15 +50,27 @@ class OrientationDirectorModule(reactContext: ReactApplicationContext) :
50
50
  }
51
51
 
52
52
  override fun sendOnDeviceOrientationChanged(params: WritableMap) {
53
- emitOnDeviceOrientationChanged(params)
53
+ try {
54
+ emitOnDeviceOrientationChanged(params)
55
+ } catch(_: Exception) {
56
+ // No listener instance yet
57
+ }
54
58
  }
55
59
 
56
60
  override fun sendOnInterfaceOrientationChanged(params: WritableMap) {
57
- emitOnInterfaceOrientationChanged(params)
61
+ try {
62
+ emitOnInterfaceOrientationChanged(params)
63
+ } catch(_: Exception) {
64
+ // No listener instance yet
65
+ }
58
66
  }
59
67
 
60
68
  override fun sendOnLockChanged(params: WritableMap) {
61
- emitOnLockChanged(params)
69
+ try {
70
+ emitOnLockChanged(params)
71
+ } catch(_: Exception) {
72
+ // No listener instance yet
73
+ }
62
74
  }
63
75
 
64
76
  companion object {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-orientation-director",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "A Modern React Native library that allows you to access orientation",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",