Style fixes
Signed-off-by: Pauli Virtanen <pav@iki.fi>
This commit is contained in:
parent
798f5d401b
commit
38962560ac
2 changed files with 9 additions and 7 deletions
|
@ -111,11 +111,12 @@ export class WidgetApi extends EventEmitter {
|
|||
} else if (payload.action === KnownWidgetActions.Terminate) {
|
||||
// Finalization needs to be async, so postpone with a promise
|
||||
let finalizePromise = Promise.resolve();
|
||||
const wait = promise => {
|
||||
const wait = (promise) => {
|
||||
finalizePromise = finalizePromise.then(value => promise);
|
||||
}
|
||||
};
|
||||
this.emit('terminate', wait);
|
||||
Promise.resolve(finalizePromise).then(() => {
|
||||
// Acknowledge that we're shut down now
|
||||
this.replyToRequest(<ToWidgetRequest>payload, {});
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue