File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,14 +157,15 @@ export class WaveTabView extends WebContentsView {
157157 this . waveReadyPromise . then ( ( ) => {
158158 this . isWaveReady = true ;
159159 } ) ;
160- wcIdToWaveTabMap . set ( this . webContents . id , this ) ;
160+ const wcId = this . webContents . id ;
161+ wcIdToWaveTabMap . set ( wcId , this ) ;
161162 if ( isDevVite ) {
162163 this . webContents . loadURL ( `${ process . env . ELECTRON_RENDERER_URL } /index.html` ) ;
163164 } else {
164165 this . webContents . loadFile ( path . join ( getElectronAppBasePath ( ) , "frontend" , "index.html" ) ) ;
165166 }
166167 this . webContents . on ( "destroyed" , ( ) => {
167- wcIdToWaveTabMap . delete ( this . webContents . id ) ;
168+ wcIdToWaveTabMap . delete ( wcId ) ;
168169 removeWaveTabView ( this . waveTabId ) ;
169170 this . isDestroyed = true ;
170171 } ) ;
@@ -286,7 +287,6 @@ function checkAndEvictCache(): void {
286287 // Otherwise, sort by lastUsedTs
287288 return a . lastUsedTs - b . lastUsedTs ;
288289 } ) ;
289- const now = Date . now ( ) ;
290290 for ( let i = 0 ; i < sorted . length - MaxCacheSize ; i ++ ) {
291291 tryEvictEntry ( sorted [ i ] . waveTabId ) ;
292292 }
You can’t perform that action at this time.
0 commit comments