From 03a24244983a706edcf8ca223d6e98be708bbfcb Mon Sep 17 00:00:00 2001 From: Renato Ribeiro Date: Mon, 6 Mar 2017 19:13:15 -0300 Subject: [PATCH] Avoid browser compatibilty errors. Usage of `Object.includes` force users to include polyfills to browser compatibility. Can be easily replaced by indexOf --- src/client/preview/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/preview/index.js b/src/client/preview/index.js index 5c392a89df93..aeaaad688cab 100644 --- a/src/client/preview/index.js +++ b/src/client/preview/index.js @@ -14,7 +14,7 @@ import reducer from './reducer'; // check whether we're running on node/browser const { navigator } = global; -const isBrowser = navigator && navigator.userAgent !== 'storyshots' && !navigator.userAgent.includes('Node.js'); +const isBrowser = navigator && navigator.userAgent !== 'storyshots' && !navigator.userAgent.indexOf('Node.js') > -1; const storyStore = new StoryStore(); const reduxStore = createStore(reducer);