File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
packages/atomic/src/components
commerce/atomic-commerce-search-box Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ export class AtomicCommerceSearchBox
229229 return ;
230230 }
231231 if (
232- ! ( 'redirectTo' in this . searchBoxState ) ||
233- ! ( 'afterRedirection' in this . searchBox )
232+ ! Object . hasOwn ( this . searchBoxState , 'redirectTo' ) ||
233+ ! Object . hasOwn ( this . searchBox , 'afterRedirection' )
234234 ) {
235235 return ;
236236 }
@@ -306,7 +306,7 @@ export class AtomicCommerceSearchBox
306306 private isStandaloneSearchBox (
307307 searchBox : SearchBox | StandaloneSearchBox
308308 ) : searchBox is StandaloneSearchBox {
309- return 'updateRedirectUrl' in searchBox ;
309+ return Object . hasOwn ( searchBox , 'updateRedirectUrl' ) ;
310310 }
311311
312312 private updateBreakpoints = once ( ( ) => updateBreakpoints ( this ) ) ;
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
215215 private isStandaloneSearchBox (
216216 searchBox : SearchBox | StandaloneSearchBox
217217 ) : searchBox is StandaloneSearchBox {
218- return 'redirectTo' in searchBox ;
218+ return Object . hasOwn ( searchBox , 'redirectTo' ) ;
219219 }
220220
221221 public initialize ( ) {
@@ -254,8 +254,8 @@ export class AtomicSearchBox implements InitializableComponent<Bindings> {
254254
255255 public componentWillUpdate ( ) {
256256 if (
257- ! ( 'redirectTo' in this . searchBoxState ) ||
258- ! ( 'afterRedirection' in this . searchBox )
257+ ! Object . hasOwn ( this . searchBoxState , 'redirectTo' ) ||
258+ ! Object . hasOwn ( this . searchBox , 'afterRedirection' )
259259 ) {
260260 return ;
261261 }
Original file line number Diff line number Diff line change 11import { expect , test } from './fixture' ;
22
33test . describe ( 'default' , ( ) => {
4- test . beforeEach ( async ( { searchBox} ) => {
4+ test . beforeEach ( async ( { searchBox, browser} ) => {
5+ browser ;
56 await searchBox . load ( { args : { suggestionTimeout : 5000 } } ) ;
67 } ) ;
78
You can’t perform that action at this time.
0 commit comments