Explorar o código

[beeswax] Fix error when executing after browser refresh

Johan Ahlen %!s(int64=9) %!d(string=hai) anos
pai
achega
873e2f9
Modificáronse 1 ficheiros con 3 adicións e 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,