diff --git a/kfet/static/kfet/js/history.js b/kfet/static/kfet/js/history.js
index fbae1226..faf1e0e2 100644
--- a/kfet/static/kfet/js/history.js
+++ b/kfet/static/kfet/js/history.js
@@ -40,7 +40,7 @@ class KHistory {
templates['opegroup'] =
'
';
- this.display = new ForestDisplay(this._$container, templates);
+ this.display = new ForestDisplay(this._$container, templates, this.data);
this._init_events();
}
diff --git a/kfet/static/kfet/js/kfet.api.js b/kfet/static/kfet/js/kfet.api.js
index d563a6e0..ae0d9bd1 100644
--- a/kfet/static/kfet/js/kfet.api.js
+++ b/kfet/static/kfet/js/kfet.api.js
@@ -1267,10 +1267,10 @@ class OperationList extends APIModelForest {
class ForestDisplay {
- constructor($container, templates) {
+ constructor($container, templates, data) {
this._templates = templates ;
this._$container = $container;
- this.data = new ModelForest();
+ this.data = data || new ModelForest();
}
@@ -1341,15 +1341,10 @@ class ForestDisplay {
/**
- * Updates stored data and displays it in container.
- * @param {Models.ModelForest} data
+ * Displays stored data in container.
* @param {Object} [options] Options for element render method
*/
- render(data, options) {
- if (data) {
- this.data = data;
- }
-
+ render(options) {
var forest = this.data ;
if (forest.is_empty())
diff --git a/kfet/static/kfet/js/kpsul.js b/kfet/static/kfet/js/kpsul.js
index 9b235972..64a7a64e 100644
--- a/kfet/static/kfet/js/kpsul.js
+++ b/kfet/static/kfet/js/kpsul.js
@@ -434,7 +434,7 @@ class ArticleManager {
'category': '
',
'article' : '
'
} ;
- this.display = new ForestDisplay($container, templates);
+ this.display = new ForestDisplay($container, templates, this.data);
this.autocomplete = new ArticleAutocomplete(this, $container);
this._init_events();