From 0681fb05fecfdad1b4aea236a46a96b81bfdaecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 24 Jan 2018 11:35:06 +0000 Subject: [PATCH] fix(my-joy-beta): polyfill Number.isFinite --- packages/my-joy-beta/package.json | 2 ++ packages/my-joy-beta/src/index.js | 6 ++++++ yarn.lock | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/packages/my-joy-beta/package.json b/packages/my-joy-beta/package.json index 9b72b6d7..cf54a6c8 100644 --- a/packages/my-joy-beta/package.json +++ b/packages/my-joy-beta/package.json @@ -29,6 +29,8 @@ "lodash.find": "^4.6.0", "lodash.get": "^4.4.2", "lodash.includes": "^4.3.0", + "lodash.isfinite": "^3.3.2", + "lodash.isfunction": "^3.0.8", "lodash.isstring": "^4.0.1", "lodash.omit": "^4.5.0", "lodash.sortby": "^4.7.0", diff --git a/packages/my-joy-beta/src/index.js b/packages/my-joy-beta/src/index.js index a1b69bbd..9d35a45d 100644 --- a/packages/my-joy-beta/src/index.js +++ b/packages/my-joy-beta/src/index.js @@ -1,9 +1,15 @@ import React from 'react'; import ReactDOM from 'react-dom'; +import isFunction from 'lodash.isfunction'; +import isFinite from 'lodash.isfinite'; import { register } from './sw'; import App from './app'; +if (!isFunction(Number.isFinite)) { + Number.isFinite = isFinite; +} + ReactDOM.render(, document.getElementById('root')); register(); diff --git a/yarn.lock b/yarn.lock index 0833a4ca..396853aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6672,6 +6672,10 @@ lodash.isfinite@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" +lodash.isfunction@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.8.tgz#4db709fc81bc4a8fd7127a458a5346c5cdce2c6b" + lodash.isinteger@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343"