From 0706548ed50c5da8b18ddf537628e0e492930e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 24 Jan 2018 11:21:27 +0000 Subject: [PATCH] fix(my-joy-beta): polyfill String.prototype.includes --- package.json | 5 ++++- packages/my-joy-beta/package.json | 1 + .../src/containers/create-instance/package.js | 5 +++-- yarn.lock | 10 +++++----- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 91da1271..62eda211 100644 --- a/package.json +++ b/package.json @@ -71,5 +71,8 @@ "breeze-nexttick": "0.2.1", "zen-observable": "0.7.1" }, - "workspaces": ["packages/*", "bundle"] + "workspaces": [ + "packages/*", + "bundle" + ] } diff --git a/packages/my-joy-beta/package.json b/packages/my-joy-beta/package.json index c0e17aef..9b72b6d7 100644 --- a/packages/my-joy-beta/package.json +++ b/packages/my-joy-beta/package.json @@ -28,6 +28,7 @@ "joyent-ui-toolkit": "^4.5.0", "lodash.find": "^4.6.0", "lodash.get": "^4.4.2", + "lodash.includes": "^4.3.0", "lodash.isstring": "^4.0.1", "lodash.omit": "^4.5.0", "lodash.sortby": "^4.7.0", diff --git a/packages/my-joy-beta/src/containers/create-instance/package.js b/packages/my-joy-beta/src/containers/create-instance/package.js index f165481c..f2890418 100644 --- a/packages/my-joy-beta/src/containers/create-instance/package.js +++ b/packages/my-joy-beta/src/containers/create-instance/package.js @@ -7,6 +7,7 @@ import get from 'lodash.get'; import { set } from 'react-redux-values'; import sortBy from 'lodash.sortby'; import find from 'lodash.find'; +import includes from 'lodash.includes'; import constantCase from 'constant-case'; import { reset } from 'redux-form'; @@ -124,8 +125,8 @@ export default compose( return { ...pkg, - ssd: pkg.name.includes('fastdisk'), - vm: pkg.name.includes('kvm'), + ssd: includes(pkg.name, 'fastdisk'), + vm: includes(pkg.name, 'kvm'), memory: pkg.memory * 1000000, disk: pkg.disk * 1000000, price: packagePrice.cost || 0, diff --git a/yarn.lock b/yarn.lock index 21750009..0833a4ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4832,8 +4832,8 @@ globby@^7.1.1: slash "^1.0.0" glogg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + version "1.0.1" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810" dependencies: sparkles "^1.0.0" @@ -6648,7 +6648,7 @@ lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" -lodash.includes@^4.2.0: +lodash.includes@^4.2.0, lodash.includes@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" @@ -10517,8 +10517,8 @@ timed-out@^4.0.0: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" timers-browserify@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" + version "2.0.5" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.5.tgz#04878fb12a155a159c9d1e59faa1f77bf4ecc44c" dependencies: setimmediate "^1.0.4"