Skip to content

Commit 2af2bc5

Browse files
committed
derp
1 parent db8c680 commit 2af2bc5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
258258
}
259259

260260
private isStandaloneSearchboxState(state: SearchBoxState | StandaloneSearchBoxState): state is StandaloneSearchBoxState {
261-
return Object.hasOwn(this.searchBoxState, 'redirectTo')
261+
return Object.hasOwn(state, 'redirectTo')
262262
}
263263

264264
public componentWillUpdate() {
@@ -282,7 +282,7 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
282282
const storage = new SafeStorage();
283283
storage.setJSON(StorageItems.STANDALONE_SEARCH_BOX_DATA, data);
284284

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

0 commit comments

Comments
 (0)