We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d30982f commit 10c9bc9Copy full SHA for 10c9bc9
src/lualib/Error.ts
@@ -4,7 +4,6 @@ type TSTLCapturedErrorStack = Array<{
4
source: string;
5
short_src: string;
6
currentline: number;
7
- func: Function;
8
}>;
9
10
function __TS__GetErrorStack(constructor: Function): TSTLCapturedErrorStack {
@@ -13,12 +12,12 @@ function __TS__GetErrorStack(constructor: Function): TSTLCapturedErrorStack {
13
12
while (true) {
14
const info = debug.getinfo(level, "f");
15
level += 1;
16
- if (info.func === constructor) {
17
- break;
18
- } else if (!info) {
+ if (!info) {
19
// constructor not in call stack
20
level = 1;
21
break;
+ } else if (info.func === constructor) {
+ break;
22
}
23
24
0 commit comments