@metron-labs/quote-react 0.1.35 → 0.1.37
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.
- package/dist/app/QuickQuote.js +8 -2
- package/dist/embed/quote.js +2 -2
- package/package.json +1 -1
package/dist/app/QuickQuote.js
CHANGED
|
@@ -157,9 +157,15 @@ function QuickQuoteInner({ fullPage = false, hideHeader = false, internal = fals
|
|
|
157
157
|
const original = event.state;
|
|
158
158
|
const href = window.location.href;
|
|
159
159
|
setTimeout(() => {
|
|
160
|
-
if (
|
|
160
|
+
if (window.location.href !== href)
|
|
161
161
|
return;
|
|
162
|
-
if
|
|
162
|
+
// Our own steps always get our state back, even if a stamp slipped through earlier -
|
|
163
|
+
// otherwise it sticks and every later visit to that step is a Turbo page visit.
|
|
164
|
+
if (hash === "#quote-request" || hash === "#matched-products") {
|
|
165
|
+
window.history.replaceState({ boqQuoteStage: hash === "#quote-request" ? "basket" : "results" }, "", href);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (!original?.turbo && window.history.state?.turbo)
|
|
163
169
|
window.history.replaceState(original, "", href);
|
|
164
170
|
});
|
|
165
171
|
};
|