Don't call push.apply, it can stack overflow with large arrays.

This commit is contained in:
Cyrus Najmabadi
2015-07-07 17:44:22 -07:00
parent 9b2d44a676
commit e0e9bcff46
4 changed files with 18 additions and 18 deletions

View File

@@ -3305,7 +3305,7 @@ namespace ts {
let declarations: Declaration[] = [];
for (let prop of props) {
if (prop.declarations) {
declarations.push.apply(declarations, prop.declarations);
addRange(declarations, prop.declarations);
}
propTypes.push(getTypeOfSymbol(prop));
}