Skip to content

Commit

Permalink
fix issue where server crashes after move due throwing error at lack …
Browse files Browse the repository at this point in the history
…of optional variable
  • Loading branch information
xXDMOGXx committed Nov 20, 2024
1 parent eb78aa5 commit 5ec51bc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/server/simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const parseErrorStack = (stack: string): StackFrame[] => {
throw new Error(`Invalid stack frame: ${line}`);
}
const [, functionName, fileName, lineNumber, columnNumber] = match;
if (!functionName || !fileName || !lineNumber || !columnNumber) {
if (!fileName || !lineNumber || !columnNumber) {
throw new Error(`Invalid stack frame: ${line}`);
}
return {
Expand Down Expand Up @@ -88,9 +88,10 @@ export class VirtualBotTunnel extends BotTunnel {
}

private emitActionComplete() {
setTimeout(() =>
this.emitter.emit("actionComplete", { success: true })
, 750); // needs to match simulator.scss animation timeout
setTimeout(
() => this.emitter.emit("actionComplete", { success: true }),
750,
); // needs to match simulator.scss animation timeout
}

send(packet: Packet) {
Expand Down

0 comments on commit 5ec51bc

Please sign in to comment.