Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3074b1d

Browse files
authored
Update Commander.ts
1 parent 6b76171 commit 3074b1d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Commander.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ export default abstract class Commander {
7070
if (!process.env.ALGORITHM_VISUALIZER) {
7171
const axios = require('axios');
7272
const opn = require('opn');
73-
process.on('beforeExit', () => {
73+
process.once('beforeExit', () => {
7474
axios.post('https://algorithm-visualizer.org/api/visualizations', {content: JSON.stringify(Commander.commands)})
7575
.then((response: any) => opn(response.data, {wait: false}))
76-
.catch(console.error)
77-
.finally(() => process.exit());
76+
.catch(console.error);
7877
});
7978
}

0 commit comments

Comments
 (0)