浏览代码

HUE-5773 [assist] On certain cases a JS error is shown on the db panel

Enrico Berti 8 年之前
父节点
当前提交
83ee79c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

+ 3 - 1
desktop/core/src/desktop/static/desktop/js/assist/assistDbSource.js

@@ -134,7 +134,9 @@ var AssistDbSource = (function () {
 
             if (db.loading()) {
               var subscription = db.loading.subscribe(function () {
-                subscription.remove();
+                if (subscription) {
+                  subscription.remove();
+                }
                 applyPopularity();
               });
             } else {