fix(my-joy-beta): more String.prototype.includes polyfills
This commit is contained in:
parent
0706548ed5
commit
7d02fb8777
@ -3,6 +3,7 @@ import { compose, graphql } from 'react-apollo';
|
|||||||
import ReduxForm from 'declarative-redux-form';
|
import ReduxForm from 'declarative-redux-form';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { set } from 'react-redux-values';
|
import { set } from 'react-redux-values';
|
||||||
|
import includes from 'lodash.includes';
|
||||||
import get from 'lodash.get';
|
import get from 'lodash.get';
|
||||||
|
|
||||||
import { InstanceTypeIcon, StatusLoader } from 'joyent-ui-toolkit';
|
import { InstanceTypeIcon, StatusLoader } from 'joyent-ui-toolkit';
|
||||||
@ -94,7 +95,7 @@ export default compose(
|
|||||||
props: ({ ownProps: { vms = false }, data: { loading, images = [] } }) => ({
|
props: ({ ownProps: { vms = false }, data: { loading, images = [] } }) => ({
|
||||||
loading,
|
loading,
|
||||||
images: images.reduce((accumulator, image) => {
|
images: images.reduce((accumulator, image) => {
|
||||||
const isVm = !image.type.includes('DATASET');
|
const isVm = !includes(image.type, 'DATASET');
|
||||||
|
|
||||||
if (isVm && !vms) {
|
if (isVm && !vms) {
|
||||||
return accumulator;
|
return accumulator;
|
||||||
|
@ -3,9 +3,10 @@ import { set } from 'react-redux-values';
|
|||||||
import { compose, graphql } from 'react-apollo';
|
import { compose, graphql } from 'react-apollo';
|
||||||
import ReduxForm from 'declarative-redux-form';
|
import ReduxForm from 'declarative-redux-form';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import get from 'lodash.get';
|
|
||||||
import { Margin } from 'styled-components-spacing';
|
import { Margin } from 'styled-components-spacing';
|
||||||
import forceArray from 'force-array';
|
import forceArray from 'force-array';
|
||||||
|
import includes from 'lodash.includes';
|
||||||
|
import get from 'lodash.get';
|
||||||
|
|
||||||
import { NetworkIcon, Button, H3, StatusLoader } from 'joyent-ui-toolkit';
|
import { NetworkIcon, Button, H3, StatusLoader } from 'joyent-ui-toolkit';
|
||||||
|
|
||||||
@ -114,7 +115,7 @@ export default compose(
|
|||||||
connect(
|
connect(
|
||||||
({ values, form }, { networks }) => {
|
({ values, form }, { networks }) => {
|
||||||
const selected = get(form, `${FORM_NAME}.values`, {});
|
const selected = get(form, `${FORM_NAME}.values`, {});
|
||||||
const empty = id => !Object.keys(selected).includes(id);
|
const empty = id => !includes(Object.keys(selected), id);
|
||||||
|
|
||||||
const _networks = networks
|
const _networks = networks
|
||||||
.map(({ id, name, ...network }) => ({
|
.map(({ id, name, ...network }) => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user