@codingame/monaco-languageclient-react
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -39,5 +39,11 @@ import { useEffect, useRef, useState } from 'react'; | ||
languageClientCount++; | ||
// As soon as a new language client is requested and we have a focus, let's become the active tab | ||
if (window.document.hasFocus()) { | ||
writeStorage(ACTIVE_TAB_LOCAL_STORAGE_KEY, currentTab); | ||
} | ||
return () => { | ||
languageClientCount--; | ||
}; | ||
}, []); | ||
useEffect(() => { | ||
setWillShutdown(false); | ||
@@ -62,3 +68,2 @@ if (shouldShutdownLanguageClientForInactivity || shouldShutdownLanguageClientAsNotActiveTab) { | ||
return () => { | ||
languageClientCount--; | ||
errorDisposable.dispose(); | ||
@@ -65,0 +70,0 @@ statusChangeDisposable.dispose(); |
{ | ||
"name": "@codingame/monaco-languageclient-react", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Monaco Editor React component", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
17386
165