Browse Source

Clear interval before setting new one

Kevin Sawicki 8 years ago
parent
commit
a851695bb9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      spec/api-browser-window-spec.js

+ 2 - 0
spec/api-browser-window-spec.js

@@ -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)