ordering-ui-external 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -163,7 +163,17 @@ var MultiCheckoutUI = function MultiCheckoutUI(props) {
|
|
|
163
163
|
}
|
|
164
164
|
}, [validationFields, user, customerState]);
|
|
165
165
|
(0, _react.useEffect)(function () {
|
|
166
|
-
if (openCarts.length || cartGroup.loading)
|
|
166
|
+
if (openCarts.length || cartGroup.loading) {
|
|
167
|
+
if (openCarts.length === 1) {
|
|
168
|
+
onRedirectPage && onRedirectPage({
|
|
169
|
+
page: 'checkout',
|
|
170
|
+
params: {
|
|
171
|
+
cartUuid: openCarts[0].uuid
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
167
177
|
onRedirectPage && onRedirectPage({
|
|
168
178
|
page: 'search'
|
|
169
179
|
});
|
package/package.json
CHANGED
|
@@ -159,7 +159,17 @@ const MultiCheckoutUI = (props) => {
|
|
|
159
159
|
}, [validationFields, user, customerState])
|
|
160
160
|
|
|
161
161
|
useEffect(() => {
|
|
162
|
-
if (openCarts.length || cartGroup.loading)
|
|
162
|
+
if (openCarts.length || cartGroup.loading) {
|
|
163
|
+
if (openCarts.length === 1) {
|
|
164
|
+
onRedirectPage && onRedirectPage({
|
|
165
|
+
page: 'checkout',
|
|
166
|
+
params: {
|
|
167
|
+
cartUuid: openCarts[0].uuid
|
|
168
|
+
}
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
return
|
|
172
|
+
}
|
|
163
173
|
onRedirectPage && onRedirectPage({ page: 'search' })
|
|
164
174
|
}, [openCarts, cartGroup])
|
|
165
175
|
|