diff --git a/src/server/utilities.ts b/src/server/utilities.ts index 300aa6e0e6a..9bc31704dba 100644 --- a/src/server/utilities.ts +++ b/src/server/utilities.ts @@ -95,14 +95,14 @@ namespace ts.server { return 0; } - return Math.max.apply(Math, paths.map(path => { + return Math.max(...paths.map(path => { if (host.directoryExists(path)) { - return host.getModifiedTime(path); + return +host.getModifiedTime(path); } else { return 0; } - })); + }); } export function mergeMaps(target: MapLike, source: MapLike ): void {