diff --git a/packages/inferno-router/src/Prompt.ts b/packages/inferno-router/src/Prompt.ts index 24c1208fa..a009cfabe 100644 --- a/packages/inferno-router/src/Prompt.ts +++ b/packages/inferno-router/src/Prompt.ts @@ -17,7 +17,12 @@ export class Prompt extends Component { this.unblock(); } - this.unblock = this.context.router.history.block(message); + this.unblock = this.context.router.history.block((tx) => { + if (message && window.confirm(message)) { + this.unblock(); + tx.retry(); + } + }); } public disable() {