We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81ec11f commit ca02232Copy full SHA for ca02232
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "rc-dialog",
3
- "version": "4.3.0",
+ "version": "4.3.1",
4
"description": "dialog ui component for react",
5
"keywords": [
6
"react",
src/DialogWrap.jsx
@@ -62,8 +62,14 @@ class DialogWrap extends React.Component {
62
}
63
64
requestClose() {
65
- if (this.props.onBeforeClose) {
66
- this.props.onBeforeClose(this.close);
+ var onBeforeClose = this.props.onBeforeClose;
+ if (onBeforeClose) {
67
+ if (onBeforeClose.length) {
68
+ onBeforeClose(this.close);
69
+ } else {
70
+ onBeforeClose();
71
+ this.close();
72
+ }
73
} else {
74
this.close();
75
0 commit comments