UNPKG

@shopgate/pwa-common-commerce

Version:

Commerce library for the Shopgate Connect PWA.

7 lines 636 B
import{ERROR_ADD_PRODUCTS_TO_CART}from"../constants";/** * Creates the dispatched ERROR_ADD_PRODUCTS_TO_CART action object. * @param {Array} products The products that where supposed to be added within * an ADD_PRODUCTS_TO_CART action. * @param {PipelineErrorElement[]} [errors] A list of errors messages for the products. * @returns {Object} The dispatched action object. */var errorAddProductsToCart=function errorAddProductsToCart(products){var errors=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return{type:ERROR_ADD_PRODUCTS_TO_CART,products:products,errors:errors};};export default errorAddProductsToCart;