react-native-ota-hot-update 2.4.2 → 2.4.3

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.
@@ -543,10 +543,10 @@ class OtaHotUpdateModule internal constructor(context: ReactApplicationContext)
543
543
  path: String?,
544
544
  base64Content: String?,
545
545
  encoding: String?,
546
- promise: Promise?
546
+ promise: Promise
547
547
  ) {
548
548
  if (path == null || base64Content == null) {
549
- promise?.reject("INVALID_ARG", "Path and base64Content are required", null)
549
+ promise.reject("INVALID_ARG", "Path and base64Content are required", null)
550
550
  return
551
551
  }
552
552
 
@@ -570,15 +570,15 @@ class OtaHotUpdateModule internal constructor(context: ReactApplicationContext)
570
570
 
571
571
  // Resolve on UI thread (React Native requirement)
572
572
  UiThreadUtil.runOnUiThread {
573
- promise?.resolve(true)
573
+ promise.resolve(true)
574
574
  }
575
575
  } catch (e: IOException) {
576
576
  UiThreadUtil.runOnUiThread {
577
- promise?.reject("WRITE_ERROR", "Failed to write file: ${e.message}", e)
577
+ promise.reject("WRITE_ERROR", "Failed to write file: ${e.message}", e)
578
578
  }
579
579
  } catch (e: Exception) {
580
580
  UiThreadUtil.runOnUiThread {
581
- promise?.reject("WRITE_ERROR", "Unexpected error: ${e.message}", e)
581
+ promise.reject("WRITE_ERROR", "Unexpected error: ${e.message}", e)
582
582
  }
583
583
  }
584
584
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ota-hot-update",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "Hot update for react native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",