Skip to content

Commit efdfada

Browse files
perf(overmind-devtools-client): clear out app when disconnected to trigger GC
1 parent 7cf4ba4 commit efdfada

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/node_modules/overmind-devtools-client/src/overmind/actions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
Component,
99
} from './types'
1010
import * as o from './operators'
11-
import { isValidJson } from './utils'
11+
import { isValidJson, createApp } from './utils'
1212

1313
export const onMessage: Operator<Message[]> = forEach(
1414
pipe(
@@ -44,6 +44,9 @@ export const setError: Action<string> = ({ state }, error) => {
4444

4545
export const onDisconnect: Action<string> = ({ state }, appName) => {
4646
if (appName in state.apps) {
47+
state.apps[appName] = createApp({
48+
name: appName,
49+
})
4750
state.apps[appName].connectionState = 'pending'
4851
}
4952
}

packages/node_modules/overmind-devtools-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Overmind Devtools VSCode",
44
"description": "Devtools for Overmind",
55
"publisher": "christianalfoni",
6-
"version": "0.0.8",
6+
"version": "0.0.10",
77
"engines": {
88
"vscode": "^1.35.0"
99
},

0 commit comments

Comments
 (0)