Skip to content

Commit b13a810

Browse files
committed
derp
1 parent db8c680 commit b13a810

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export class AtomicCommerceSearchBox
247247
const storage = new SafeStorage();
248248
storage.setJSON(StorageItems.STANDALONE_SEARCH_BOX_DATA, data);
249249

250-
this.searchBox.afterRedirection();
250+
(this.searchBox as StandaloneSearchBox).afterRedirection();
251251

252252
const event = new CustomEvent<RedirectionPayload>('redirect');
253253
this.dispatchEvent(event);
@@ -312,7 +312,7 @@ export class AtomicCommerceSearchBox
312312
private isStandaloneSearchboxState(
313313
state: SearchBoxState | StandaloneSearchBoxState
314314
): state is StandaloneSearchBoxState {
315-
return Object.hasOwn(this.searchBoxState, 'redirectTo');
315+
return Object.hasOwn(state, 'redirectTo');
316316
}
317317

318318
private updateBreakpoints = once(() => updateBreakpoints(this));

packages/atomic/src/components/search/atomic-search-box/atomic-search-box.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,6 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
212212
@AriaLiveRegion('search-suggestions', true)
213213
protected suggestionsAriaMessage!: string;
214214

215-
private isStandaloneSearchBoxState(): this is (AtomicSearchBox & {
216-
searchBoxState: StandaloneSearchBoxState}) {
217-
return Object.hasOwn(this.searchBoxState, 'redirectTo');
218-
}
219-
220215
private isStandaloneSearchBox(
221216
searchBox: SearchBox | StandaloneSearchBox
222217
): searchBox is StandaloneSearchBox {
@@ -258,7 +253,7 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
258253
}
259254

260255
private isStandaloneSearchboxState(state: SearchBoxState | StandaloneSearchBoxState): state is StandaloneSearchBoxState {
261-
return Object.hasOwn(this.searchBoxState, 'redirectTo')
256+
return Object.hasOwn(state, 'redirectTo')
262257
}
263258

264259
public componentWillUpdate() {
@@ -282,7 +277,7 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
282277
const storage = new SafeStorage();
283278
storage.setJSON(StorageItems.STANDALONE_SEARCH_BOX_DATA, data);
284279

285-
this.searchBox.afterRedirection();
280+
(this.searchBox as StandaloneSearchBox).afterRedirection();
286281
const event = this.redirect.emit({redirectTo, value});
287282
if (!event.defaultPrevented) {
288283
window.location.href = redirectTo;

0 commit comments

Comments
 (0)