Skip to content

Commit

Permalink
fix acceptCancellationSource
Browse files Browse the repository at this point in the history
Signed-off-by: Uni Sayo <unibtc@gmail.com>
  • Loading branch information
uniibu committed Apr 2, 2019
1 parent 07d0f43 commit ff5aaef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/browser/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export abstract class AbstractDialog<T> extends BaseWidget {
if (!this.resolve) {
return;
}
this.validateCancellationSource.cancel();
this.validateCancellationSource = new CancellationTokenSource();
const token = this.validateCancellationSource.token;
this.acceptCancellationSource.cancel();
this.acceptCancellationSource = new CancellationTokenSource();
const token = this.acceptCancellationSource.token;
const value = this.value;
const error = await this.isValid(value, 'open');
if (token.isCancellationRequested) {
Expand Down

0 comments on commit ff5aaef

Please sign in to comment.