Browse Source

AMBARI-5523. Jobs controller not critical js error when "No jobs to display" (alexantonenko)

Alex Antonenko 11 years ago
parent
commit
ca6e4de6d6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ambari-web/app/controllers/main/jobs_controller.js

+ 3 - 0
ambari-web/app/controllers/main/jobs_controller.js

@@ -366,6 +366,9 @@ App.MainJobsController = Em.Controller.extend({
   }),
 
   lastIDSuccessCallback: function(data, jqXHR, textStatus) {
+    if(!data.entities[0]){
+      return;
+    }
     var lastReceivedID = data.entities[0].entity;
     if(this.get('lastJobID') == '') {
       this.set('lastJobID', lastReceivedID);