diff --git a/src/InkTabBarMixin.js b/src/InkTabBarMixin.js index 3cccd556..e2cbf51e 100755 --- a/src/InkTabBarMixin.js +++ b/src/InkTabBarMixin.js @@ -38,6 +38,12 @@ function offset(elem) { } function componentDidUpdate(component, init) { + // If there is no css rendered, don't generate the ink bar + // fix https://github.com/ant-design/ant-design/issues/8001 + if (document.styleSheets.length === 0 || + (document.styleSheets.length === 1 && document.styleSheets[0].rules.length === 0)) { + return; + } const { styles } = component.props; const wrapNode = component.nav || component.root; const containerOffset = offset(wrapNode); @@ -98,7 +104,6 @@ function componentDidUpdate(component, init) { } export default { - getDefaultProps() { return { inkBarAnimated: true,