Skip to content

Commit

Permalink
Merge pull request #497 from lona-web-org/fscherf/rendering/fix-call-…
Browse files Browse the repository at this point in the history
…stack-issue

client2: rendering: fix call stack limit problems in node cache
  • Loading branch information
fscherf authored Oct 18, 2023
2 parents a9b641e + 6122021 commit 12f00c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lona/client2/_lona/client2/rendering-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export class LonaRenderingEngine {
node.remove();

this._remove_widget_if_present(node_id);
this._clean_node_cache();
};

_remove_widget_if_present(node_id) {
Expand Down Expand Up @@ -490,6 +489,7 @@ export class LonaRenderingEngine {
const node = this._render_node(data[1]);

this._set_node(node, node_id, data[0]);
this._clean_node_cache();

// RESET
} else if(operation == Lona.protocol.OPERATION.RESET) {
Expand All @@ -509,6 +509,7 @@ export class LonaRenderingEngine {
// CLEAR
} else if(operation == Lona.protocol.OPERATION.CLEAR) {
this._clear_node(node_id);
this._clean_node_cache();

// INSERT
} else if(operation == Lona.protocol.OPERATION.INSERT) {
Expand All @@ -519,6 +520,7 @@ export class LonaRenderingEngine {
// REMOVE
} else if(operation == Lona.protocol.OPERATION.REMOVE) {
this._remove_node(data[0]);
this._clean_node_cache();

};
};
Expand Down Expand Up @@ -635,8 +637,6 @@ export class LonaRenderingEngine {
data.forEach(patch => {
this._apply_patch(patch);
});

this._clean_node_cache();
};

this._run_widget_hooks();
Expand Down

0 comments on commit 12f00c7

Please sign in to comment.