浏览代码

Merge pull request #4712 from chaoleili/dev-shutdownButton

Fix bug for shutdown button in runsession
Afshin Darian 7 年之前
父节点
当前提交
adc08ef852
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/running/src/index.ts

+ 2 - 1
packages/running/src/index.ts

@@ -322,7 +322,8 @@ class RunningSessions extends Widget {
     }
 
     // Check for terminals shutdown.
-    if (ElementExt.hitTest(shutdownTerms, clientX, clientY)) {
+    // Terminals might be disabled, check node exist first.
+    if (shutdownTerms && ElementExt.hitTest(shutdownTerms, clientX, clientY)) {
       showDialog({
         title: 'Shutdown All Terminals?',
         body: 'Shut down all terminals?',