X Tutup
Skip to content

Commit 10c9bc9

Browse files
committed
bugfix
1 parent d30982f commit 10c9bc9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lualib/Error.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ type TSTLCapturedErrorStack = Array<{
44
source: string;
55
short_src: string;
66
currentline: number;
7-
func: Function;
87
}>;
98

109
function __TS__GetErrorStack(constructor: Function): TSTLCapturedErrorStack {
@@ -13,12 +12,12 @@ function __TS__GetErrorStack(constructor: Function): TSTLCapturedErrorStack {
1312
while (true) {
1413
const info = debug.getinfo(level, "f");
1514
level += 1;
16-
if (info.func === constructor) {
17-
break;
18-
} else if (!info) {
15+
if (!info) {
1916
// constructor not in call stack
2017
level = 1;
2118
break;
19+
} else if (info.func === constructor) {
20+
break;
2221
}
2322
}
2423
while (true) {

0 commit comments

Comments
 (0)
X Tutup