From b1438204dffe033b685caae324d82d136286f3ee Mon Sep 17 00:00:00 2001 From: Graham McIntie Date: Sat, 14 Feb 2026 14:53:02 -0600 Subject: [PATCH] Fix Cytoscape.js crash on navigation away from network map - Stop running layout before destroy to prevent async callbacks hitting null renderer - Set wheelSensitivity to 1 (default) to suppress console warning --- assets/js/app.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/js/app.ts b/assets/js/app.ts index dcce2f82..735cac55 100644 --- a/assets/js/app.ts +++ b/assets/js/app.ts @@ -588,6 +588,11 @@ const NetworkMap = { destroyed(this: any) { if (this.cy) { + // Stop any running layout before destroying to prevent async callbacks + // from accessing a destroyed renderer + try { + this.cy.stop() + } catch (_e) { /* ignore */ } this.cy.destroy() this.cy = null } @@ -803,7 +808,7 @@ const NetworkMap = { }, minZoom: 0.2, maxZoom: 3, - wheelSensitivity: 0.2 + wheelSensitivity: 1 }) // Add click handler for nodes