Skip to content

Commit ffb6938

Browse files
Merge pull request #155 from microsoft/fixSpreadArrayForNonConcatSpreadables
Fix __spreadArray for non-concat-spreadables
2 parents 0b93014 + dc0616a commit ffb6938

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tslib.es6.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export function __spreadArray(to, from, pack) {
169169
ar[i] = from[i];
170170
}
171171
}
172-
return to.concat(ar || from);
172+
return to.concat(ar || Array.prototype.slice.call(from));
173173
}
174174

175175
export function __await(v) {

tslib.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ var __createBinding;
210210
ar[i] = from[i];
211211
}
212212
}
213-
return to.concat(ar || from);
213+
return to.concat(ar || Array.prototype.slice.call(from));
214214
};
215215

216216
__await = function (v) {

0 commit comments

Comments
 (0)