Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Commit

Permalink
fix: remove needless use of async
Browse files Browse the repository at this point in the history
  • Loading branch information
sqs committed Aug 15, 2018
1 parent 46c2345 commit 716b390
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cxp/clientCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,23 @@ export function registerBuiltinClientCommands<S extends ConfigurationSubject, C
subscription.add(
controller.registries.commands.registerCommand({
command: 'open',
run: async (url: string) => {
run: (url: string) => {
// The `open` client command is usually implemented by ActionItem rendering the action with the
// HTML <a> element, not by handling it here. Using an HTML <a> element means it is a standard
// link, and native system behaviors such as open-in-new-tab work.
//
// If a client is not running in a web browser, this handler should be updated to call the system's
// default URL handler using the system (e.g., Electron) API.
window.open(url, '_blank')
return Promise.resolve()
},
})
)

subscription.add(
controller.registries.commands.registerCommand({
command: 'updateConfiguration',
run: async (...anyArgs: any[]): Promise<void> => {
run: (...anyArgs: any[]): Promise<void> => {
const args = anyArgs as ActionContributionClientCommandUpdateConfiguration['commandArguments']
// Return with .toPromise() so that it gets executed (otherwise, the observable will never be
// subscribed to and will never execute the update operation).
Expand Down

0 comments on commit 716b390

Please sign in to comment.