Skip to content

Commit

Permalink
fix(module:modal): miss returned value from nzOnOk or nzOnCancel (#1456)
Browse files Browse the repository at this point in the history
* fix(module:modal): miss returned value from nzOnOk or nzOnCancel

* add type hint
  • Loading branch information
tuoz authored and vthinkxie committed May 28, 2018
1 parent a538dbf commit 9d6e93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/modal/nz-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class NzModalComponent<T = any, R = any> extends NzModalRef<T, R> 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) => {
Expand Down

0 comments on commit 9d6e93b

Please sign in to comment.