Browse Source

update ScrollNumber render

pull/596/head
afc163 9 years ago
parent
commit
a1e2099d4a
  1. 18
      components/badge/ScrollNumber.jsx

18
components/badge/ScrollNumber.jsx

@ -98,11 +98,19 @@ class AntScrollNumber extends React.Component {
const props = assign({}, this.props, {
className: `${this.props.prefixCls} ${this.props.className}`
});
return createElement(
this.props.component,
props,
this.renderNumberElement()
);
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
return createElement(
this.props.component,
props,
this.renderNumberElement()
);
} else {
return createElement(
this.props.component,
props,
props.count
);
}
}
}

Loading…
Cancel
Save