@metron-labs/quote-react 0.1.36 → 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.
@@ -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 (original?.turbo || window.location.href !== href)
160
+ if (window.location.href !== href)
161
161
  return;
162
- if (window.history.state?.turbo)
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
  };