Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b76171 commit 3074b1dCopy full SHA for 3074b1d
src/Commander.ts
@@ -70,10 +70,9 @@ export default abstract class Commander {
70
if (!process.env.ALGORITHM_VISUALIZER) {
71
const axios = require('axios');
72
const opn = require('opn');
73
- process.on('beforeExit', () => {
+ process.once('beforeExit', () => {
74
axios.post('https://algorithm-visualizer.org/api/visualizations', {content: JSON.stringify(Commander.commands)})
75
.then((response: any) => opn(response.data, {wait: false}))
76
- .catch(console.error)
77
- .finally(() => process.exit());
+ .catch(console.error);
78
});
79
}
0 commit comments