diff --git a/client/my-sites/checkout/checkout/checkout.jsx b/client/my-sites/checkout/checkout/checkout.jsx index 0ff9f1835505c1..58d5066c760bd9 100644 --- a/client/my-sites/checkout/checkout/checkout.jsx +++ b/client/my-sites/checkout/checkout/checkout.jsx @@ -7,7 +7,7 @@ import { flatten, filter, find, get, isEmpty, isEqual, reduce, startsWith } from import i18n, { localize } from 'i18n-calypso'; import page from 'page'; import PropTypes from 'prop-types'; -import React from 'react'; +import React, { Component } from 'react'; /** * Internal dependencies @@ -69,7 +69,7 @@ import { loadTrackingTool } from 'state/analytics/actions'; import { getProductsList, isProductsListFetching } from 'state/products-list/selectors'; import QueryProducts from 'components/data/query-products-list'; -class Checkout extends React.Component { +export class Checkout extends Component { static propTypes = { cards: PropTypes.array.isRequired, couponCode: PropTypes.string, @@ -160,6 +160,7 @@ class Checkout extends React.Component { } getPlanProducts() { + // TODO: props.cart.products isn't defined in propTypes and is unsafely accessed, fix this. return this.props.cart.products.filter( ( { product_slug } ) => getPlan( product_slug ) ); } @@ -549,7 +550,7 @@ class Checkout extends React.Component { } isLoading() { - const isLoadingCart = ! this.props.cart.hasLoadedFromServer; + const isLoadingCart = ! this.props.cart.hasLoadedFromServer; //@TODO is this a function? Should it be invoked for a bool? const isLoadingProducts = this.props.isProductsListFetching; return isLoadingCart || isLoadingProducts;