Clear interval before setting new one

This commit is contained in:
Kevin Sawicki 2017-01-26 09:57:53 -08:00
parent e2e33a8cf0
commit a851695bb9

View file

@ -1667,6 +1667,8 @@ describe('BrowserWindow module', function () {
const showLastDevToolsPanel = () => {
w.webContents.once('devtools-opened', function () {
clearInterval(showPanelIntervalId)
showPanelIntervalId = setInterval(function () {
if (w == null || w.isDestroyed()) {
clearInterval(showLastDevToolsPanel)