Browse Source

Fix badge count always 0 bug in IE8/9, #605

pull/617/head
afc163 9 years ago
parent
commit
c269f65d08
  1. 4
      components/badge/ScrollNumber.jsx

4
components/badge/ScrollNumber.jsx

@ -1,5 +1,6 @@
import React, { createElement } from 'react';
import assign from 'object-assign';
import { isCssAnimationSupported } from 'css-animation';
function getNumberArray(num) {
return num ?
@ -98,7 +99,8 @@ class AntScrollNumber extends React.Component {
const props = assign({}, this.props, {
className: `${this.props.prefixCls} ${this.props.className}`
});
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
const isBrowser = (typeof document !== 'undefined' && typeof window !== 'undefined');
if (isBrowser && isCssAnimationSupported) {
return createElement(
this.props.component,
props,

Loading…
Cancel
Save