Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #335 from jhnns/fix/unsafe-array-access
Browse files Browse the repository at this point in the history
Fix unsafe array access in internalSourceBreakpoint
  • Loading branch information
roblourens authored Jun 17, 2018
2 parents 65da915 + 75e3042 commit 6608d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chrome/internalSourceBreakpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class InternalSourceBreakpoint {
}

function isLogpointMessage(m: Crdp.Runtime.ConsoleAPICalledEvent): boolean {
return m.stackTrace && m.stackTrace.callFrames[0].url === InternalSourceBreakpoint.LOGPOINT_URL;
return m.stackTrace && m.stackTrace.callFrames.length > 0 && m.stackTrace.callFrames[0].url === InternalSourceBreakpoint.LOGPOINT_URL;
}

export function stackTraceWithoutLogpointFrame(m: Crdp.Runtime.ConsoleAPICalledEvent): Crdp.Runtime.StackTrace {
Expand Down

0 comments on commit 6608d00

Please sign in to comment.