Преглед изворни кода

fix: compatible with Firefox 40.0.3

宜鑫 пре 7 година
родитељ
комит
85f4665011
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/components/Ellipsis/index.js

+ 1 - 1
src/components/Ellipsis/index.js

@@ -95,7 +95,7 @@ export default class Ellipsis extends Component {
   computeLine = () => {
     const { lines } = this.props;
     if (lines && !isSupportLineClamp) {
-      const text = this.shadowChildren.innerText;
+      const text = this.shadowChildren.innerText || this.shadowChildren.textContent;
       const lineHeight = parseInt(getComputedStyle(this.root).lineHeight, 10);
       const targetHeight = lines * lineHeight;
       this.content.style.height = `${targetHeight}px`;