Skip to content

Commit

Permalink
[plugin] fix executeCommand arguments passing
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 Nov 13, 2019
1 parent 1d23511 commit 51e9bff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-ext/src/hosted/node/plugin-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ process.on('unhandledRejection', (reason: any, promise: Promise<any>) => {
if (index >= 0) {
promise.catch(err => {
unhandledPromises.splice(index, 1);
console.error(`Promise rejection not handled in one second: ${err}`);
if (err.stack) {
console.error(`Promise rejection not handled in one second: ${err} , reason: ${reason}`);
if (err && err.stack) {
console.error(`With stack trace: ${err.stack}`);
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/plugin/command-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class CommandRegistryImpl implements CommandRegistryExt {
return KnownCommands.map(id, args, (mappedId: string, mappedArgs: any[] | undefined) =>
this.proxy.$executeCommand(mappedId, ...mappedArgs));
} else {
return this.proxy.$executeCommand(id, args);
return this.proxy.$executeCommand(id, ...args);
}
}
// tslint:enable:no-any
Expand Down

0 comments on commit 51e9bff

Please sign in to comment.