提交 510fdc65 编写于 作者: M Matt Bierner

Prefer spread over apply

上级 705aa30f
......@@ -81,7 +81,7 @@ export class CommandService extends Disposable implements ICommandService {
}
try {
this._onWillExecuteCommand.fire({ commandId: id, args });
const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]);
const result = this._instantiationService.invokeFunction(command.handler, ...args);
this._onDidExecuteCommand.fire({ commandId: id, args });
return Promise.resolve(result);
} catch (err) {
......@@ -90,4 +90,4 @@ export class CommandService extends Disposable implements ICommandService {
}
}
registerSingleton(ICommandService, CommandService, true);
\ No newline at end of file
registerSingleton(ICommandService, CommandService, true);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册