File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ function startNative() {
154154 nvimServer . instance = startNative ( ) ;
155155 } else {
156156 delete nvimServer . instance ;
157- LOG ( "error " , "Failed to connect neovim, please make sure your neovim version 0.5 or above." ) ;
157+ LOG ( "warn " , "Failed to connect neovim, please make sure your neovim version 0.5 or above." ) ;
158158 }
159159 } ) ;
160160 nm . onMessage . addListener ( async ( resp ) => {
Original file line number Diff line number Diff line change @@ -319,10 +319,11 @@ function start(browser) {
319319 }
320320
321321 function sendTabMessage ( tabId , frameId , message , cb ) {
322- if ( frameId === - 1 ) {
323- chrome . tabs . sendMessage ( tabId , message ) ;
324- } else {
325- chrome . tabs . sendMessage ( tabId , message , { frameId : frameId } ) ;
322+ const opts = ( frameId === - 1 ) ? undefined : { frameId : frameId } ;
323+ // use catch to suppress Uncaught (in promise) Error on sending message to unsupported tabs like chrome://
324+ const p = chrome . tabs . sendMessage ( tabId , message , opts ) ;
325+ if ( p ) {
326+ p . catch ( ( e ) => { } ) ;
326327 }
327328 }
328329 var _lastActiveTabId = null ;
You can’t perform that action at this time.
0 commit comments