From 9d6e93bc0dd572823f0b7d0b549a0acd39f7bfb3 Mon Sep 17 00:00:00 2001 From: Hypo Date: Mon, 28 May 2018 20:49:13 +0800 Subject: [PATCH] fix(module:modal): miss returned value from nzOnOk or nzOnCancel (#1456) * fix(module:modal): miss returned value from nzOnOk or nzOnCancel * add type hint --- components/modal/nz-modal.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal/nz-modal.component.ts b/components/modal/nz-modal.component.ts index 6c70d1a4edc..da4e215a370 100644 --- a/components/modal/nz-modal.component.ts +++ b/components/modal/nz-modal.component.ts @@ -221,7 +221,7 @@ export class NzModalComponent extends NzModalRef impleme trigger.emit(this.getContentComponent()); } else if (typeof trigger === 'function') { const result = trigger(this.getContentComponent()); - const caseClose = (doClose: boolean | void | {}) => (doClose !== false) && this.close(); // Users can return "false" to prevent closing by default + const caseClose = (doClose: boolean | void | {}) => (doClose !== false) && this.close(doClose as R); // Users can return "false" to prevent closing by default if (isPromise(result)) { this[ loadingKey ] = true; const handleThen = (doClose) => {