Skip to content

Commit

Permalink
Fix unregisterPlotClient
Browse files Browse the repository at this point in the history
  • Loading branch information
timtmok committed Aug 30, 2024
1 parent 2b9ee3b commit 6104ec2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,9 @@ export class PositronPlotsService extends Disposable implements IPositronPlotsSe
const plotClients = this._plotClientsByComm.get(plotId);
if (plotClients) {
const indexToRemove = plotClients.indexOf(plotClient);
plotClients.splice(indexToRemove, 1);
if (indexToRemove >= 0) {
plotClients.splice(indexToRemove, 1);
}
if (plotClients.length === 0) {
const commProxy = this._plotCommProxies.get(plotId);
commProxy?.dispose();
Expand Down

0 comments on commit 6104ec2

Please sign in to comment.