react-native-nitro-sse 1.2.0 → 1.2.1

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.
@@ -165,6 +165,8 @@ class NitroSse: HybridNitroSseSpec {
165
165
 
166
166
  private func establishConnection() {
167
167
  dispatchPrecondition(condition: .onQueue(sseQueue))
168
+ guard isRunning, let config = config, let url = URL(string: config.url) else { return }
169
+
168
170
  let handler = SseHandler(parent: self)
169
171
  var esConfig = EventSource.Config(handler: handler, url: url)
170
172
  esConfig.headers = config.headers ?? [:]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-sse",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "High-performance Server-Sent Events (SSE) for React Native, powered by Nitro Modules.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",