소스 검색

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 {