From fa8715085ac249b0fa42a7a60483df3d8c3e09f0 Mon Sep 17 00:00:00 2001 From: David Sharp Date: Wed, 1 May 2019 11:05:30 +0100 Subject: [PATCH] Give RNEventSource a default (empty) options param Underlying EventSource fails when not passed options --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bad3010..f1e7c81 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ import EventSource from './EventSource' class RNEventSource { - constructor(url, options) { + constructor(url, options={}) { this.url = url; this.options = options; this.eventSource = new EventSource(url, options);