Skip to content

Commit ea79b0b

Browse files
committed
Fix ts adapter class missing some properties because of a metatable
1 parent e511209 commit ea79b0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

game/scripts/vscripts/lib/dota_ts_adapter.ts

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ function clearTable(table: object) {
101101
for (const key in table) {
102102
delete (table as any)[key];
103103
}
104+
105+
// Remove metatable added by ExtendInstance
106+
// https://github.com/SteamDatabase/GameTracking-Dota2/blob/7edcaa294bdcf493df0846f8bbcd4d47a5c3bd57/game/core/scripts/vscripts/init.lua#L195
107+
setmetatable(table, undefined);
104108
}
105109

106110
function getFileScope(): [any, string] {

0 commit comments

Comments
 (0)