Skip to content

Commit

Permalink
[plugin] don't wrap promise in promise
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Efftinge <sven.efftinge@typefox.io>
  • Loading branch information
svenefftinge committed Sep 30, 2019
1 parent 528f1a0 commit 9eb699b
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ export class CommandRegistryMainImpl implements CommandRegistryMain, Disposable

// tslint:disable-next-line:no-any
$executeCommand<T>(id: string, ...args: any[]): PromiseLike<T | undefined> {
try {
return Promise.resolve(this.delegate.executeCommand(id, ...args));
} catch (e) {
return Promise.reject(e);
}
return this.delegate.executeCommand(id, ...args);
}

$getKeyBinding(commandId: string): PromiseLike<theia.CommandKeyBinding[] | undefined> {
Expand Down

0 comments on commit 9eb699b

Please sign in to comment.