Skip to content

Commit f9e1d6c

Browse files
committed
Fix FES stack frame access for internal errors
1 parent 75cace3 commit f9e1d6c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/friendly_errors/fes_core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ function fesCore(p5, fn){
593593

594594
// get the function just above the topmost frame in the friendlyStack.
595595
// i.e the name of the library function called from user's code
596-
const func = stacktrace[friendlyStack[0].frameIndex - 2].functionName
596+
const func = stacktrace[friendlyStack[0].frameIndex - 1].functionName
597597
.split('.')
598598
.slice(-1)[0];
599599

0 commit comments

Comments
 (0)