Skip to content

Commit a527f88

Browse files
authored
Merge pull request #8175 from processing/fix/fes-internal
Fix FES stack frame access for internal errors
2 parents 31163da + a9dc452 commit a527f88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)