Closed SlimeQ closed 8 years ago
This can happen if EditorTokens.refreshTokens
is called when no window has focus. Returning null
from BrowserWindow.getFocusedWindow
is a documented possibility. Would this be an unreasonable fix?
const focusedWindow = remote.BrowserWindow.getFocusedWindow()
if (!focusedWindow) {
// Oops. No focused window to notify.
return;
}
this.worker.webContents.send('tokenize',
editor.id,
editor.getText(),
focusedWindow.id
);
I've personally run into this issue several times now. Any ETA on my pull request?
[Enter steps to reproduce below:]
Atom Version: 1.8.0 System: Ubuntu 14.04.4 Thrown From: autocomplete-java-minus package, v0.12.0
Stack Trace
Uncaught TypeError: Cannot read property 'id' of null
Commands
Config
Installed Packages