File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/compass-components/src/hooks Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { expect } from 'chai';
44import { useHotkeys , formatHotkey } from './use-hotkeys' ;
55import sinon from 'sinon' ;
66
7- const initialUserAgent = window . navigator . userAgent ;
7+ const initialUserAgent = navigator . userAgent ;
88
99const mappingUseCases = {
1010 mac : [
@@ -39,15 +39,15 @@ const mappingUseCases = {
3939
4040describe ( 'use-hotkeys' , function ( ) {
4141 after ( function ( ) {
42- Object . defineProperty ( window . navigator , 'userAgent' , {
42+ Object . defineProperty ( navigator , 'userAgent' , {
4343 value : initialUserAgent ,
4444 writable : true ,
4545 } ) ;
4646 } ) ;
4747
4848 context ( 'on macOS' , function ( ) {
4949 before ( function ( ) {
50- Object . defineProperty ( window . navigator , 'userAgent' , {
50+ Object . defineProperty ( navigator , 'userAgent' , {
5151 value :
5252 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36' ,
5353 writable : true ,
You can’t perform that action at this time.
0 commit comments