From 02847e570dd8a9837b2fa3bcc948d87b84a61e20 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Wed, 1 Aug 2018 14:37:39 +0200 Subject: [PATCH] Finishing touches to implementing Contiamo Polling spec --- src/Poll.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Poll.tsx b/src/Poll.tsx index 10b52ad1..f9f1b619 100644 --- a/src/Poll.tsx +++ b/src/Poll.tsx @@ -169,6 +169,9 @@ class ContextlessPoll extends React.Component, Readonly typeof this.props.requestOptions === "function" ? this.props.requestOptions() : this.props.requestOptions || {}; + // 304 is not a OK status code but is green in Chrome 🤦🏾‍♂️ + private isResponseOk = (response: Response) => response.ok || response.status === 304; + /** * This thing does the actual poll. */ @@ -203,7 +206,7 @@ class ContextlessPoll extends React.Component, Readonly