Skip to content

Commit b895e9e

Browse files
committed
quick fix NaN in stack
1 parent 7f12ba8 commit b895e9e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/debug/warp10DebugRuntime.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,7 @@ ${this.addBreakPoints(this.ws ?? "")}`;
328328
async getStackValue(key: string) {
329329
return new Promise((resolve, reject) => {
330330
Requester.send(this.endpoint ?? "", `'${this.sid}' TSESSION TSTACK STACKTOLIST REVERSE ${key} GET`)
331-
.then((vars: any) => {
332-
const data = JSON.parse(vars ?? "[]")[0];
333-
resolve(JSON.stringify(data));
334-
})
331+
.then((vars: any) => resolve((vars ?? "[]").replace(/^\[(.*)\]/g, '$1')))
335332
.catch((e) => reject(e));
336333
});
337334
}

0 commit comments

Comments
 (0)