Skip to content

Commit 047ace8

Browse files
committed
More PR review
1 parent d30f307 commit 047ace8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/node/src/integrations/localvariables/localvariables-async.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,13 @@ export class LocalVariablesAsync implements Integration {
119119
isPaused = false;
120120
});
121121

122-
session.on('Debugger.paused', async event => {
122+
session.on('Debugger.paused', event => {
123123
isPaused = true;
124124

125125
this._handlePaused(session, options.stackParser, event.params as PausedExceptionEvent)
126-
.then(async () => {
127-
if (isPaused) {
128-
// After the pause work is complete, resume execution or the exception context memory is leaked
129-
await session.post('Debugger.resume');
130-
}
126+
.then(() => {
127+
// After the pause work is complete, resume execution!
128+
return isPaused ? session.post('Debugger.resume') : Promise.resolve();
131129
})
132130
.catch(_ => {
133131
//

0 commit comments

Comments
 (0)