Explorar el Código

[beeswax] Fix error when executing after browser refresh

Johan Ahlen hace 9 años
padre
commit
873e2f9
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      apps/beeswax/src/beeswax/static/beeswax/js/beeswax.vm.js

+ 3 - 1
apps/beeswax/src/beeswax/static/beeswax/js/beeswax.vm.js

@@ -428,7 +428,9 @@ function BeeswaxViewModel(server, assistHelper) {
       type: 'GET',
       success: function(data) {
         self.updateHistory(data.query_history);
-        self.database(data.query_history.database);
+        if (data.query_history.database) {
+          self.database(data.query_history.database);
+        }
         $(document).trigger('fetched.query', [data]);
       },
       error: error_fn,