Skip to content

Commit bb46e78

Browse files
committed
Fix spread/rest emit for symbols.
It used the index of the symbol property as the name, not the symbol itself.
1 parent c011b36 commit bb46e78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/emitter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {
3939
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
4040
t[p] = s[p];
4141
if (typeof Object.getOwnPropertySymbols === "function")
42-
for (var i = 0, s = Object.getOwnPropertySymbols(s); i < s.length; i++)
43-
t[i] = s[i];
42+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
43+
t[p[i]] = s[p[i]];
4444
}
4545
return t;
4646
};`;
@@ -51,8 +51,8 @@ var __rest = (this && this.__rest) || function (s, e) {
5151
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5252
t[p] = s[p];
5353
if (typeof Object.getOwnPropertySymbols === "function")
54-
for (var i = 0, s = Object.getOwnPropertySymbols(s); i < s.length; i++) if (e.indexOf(s[i]) > 0)
55-
t[i] = s[i];
54+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
55+
t[p[i]] = s[p[i]];
5656
return t;
5757
};`;
5858

0 commit comments

Comments
 (0)