Skip to content

Commit 2b6a3fd

Browse files
committed
fix: switching profiles in profileexplorer may result in Internal Error
if we have yet to start a terminal pty job, the componentWillUnmount gets a null pointer exception
1 parent 42d30fd commit 2b6a3fd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/plugin-codeflare/src/components/RestartableTerminal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ export default class RestartableTerminal extends React.PureComponent<Props, Stat
100100

101101
public componentWillUnmount() {
102102
this.mounted = false
103-
if (this.state.job) {
104-
this.state.job.abort()
105-
}
103+
this.state?.job?.abort()
106104
}
107105

108106
public render() {

0 commit comments

Comments
 (0)