@@ -56,11 +56,9 @@ export function SelectionTools({ config, updateConfig }) {
5656 customSelectionTools [ editingIndex ] = editingTool
5757 await updateConfig ( { customSelectionTools } )
5858 }
59- Browser . runtime
60- . sendMessage ( {
61- type : 'REFRESH_MENU' ,
62- } )
63- . catch ( console . error )
59+ Browser . runtime . sendMessage ( {
60+ type : 'REFRESH_MENU' ,
61+ } )
6462 setEditing ( false )
6563 } }
6664 >
@@ -113,11 +111,9 @@ export function SelectionTools({ config, updateConfig }) {
113111 const activeSelectionTools = config . activeSelectionTools . filter ( ( i ) => i !== key )
114112 if ( checked ) activeSelectionTools . push ( key )
115113 await updateConfig ( { activeSelectionTools } )
116- Browser . runtime
117- . sendMessage ( {
118- type : 'REFRESH_MENU' ,
119- } )
120- . catch ( console . error )
114+ Browser . runtime . sendMessage ( {
115+ type : 'REFRESH_MENU' ,
116+ } )
121117 } }
122118 />
123119 { t ( toolsConfig [ key ] . label ) }
@@ -137,11 +133,9 @@ export function SelectionTools({ config, updateConfig }) {
137133 const customSelectionTools = [ ...config . customSelectionTools ]
138134 customSelectionTools [ index ] = { ...tool , active : e . target . checked }
139135 await updateConfig ( { customSelectionTools } )
140- Browser . runtime
141- . sendMessage ( {
142- type : 'REFRESH_MENU' ,
143- } )
144- . catch ( console . error )
136+ Browser . runtime . sendMessage ( {
137+ type : 'REFRESH_MENU' ,
138+ } )
145139 } }
146140 />
147141 { tool . name }
@@ -166,11 +160,9 @@ export function SelectionTools({ config, updateConfig }) {
166160 const customSelectionTools = [ ...config . customSelectionTools ]
167161 customSelectionTools . splice ( index , 1 )
168162 await updateConfig ( { customSelectionTools } )
169- Browser . runtime
170- . sendMessage ( {
171- type : 'REFRESH_MENU' ,
172- } )
173- . catch ( console . error )
163+ Browser . runtime . sendMessage ( {
164+ type : 'REFRESH_MENU' ,
165+ } )
174166 } }
175167 >
176168 < TrashIcon />
0 commit comments