diff options
-rw-r--r-- | .eslintrc.json | 1 | ||||
-rw-r--r-- | js/src/tooltip.js | 4 | ||||
-rw-r--r-- | js/tests/unit/tooltip.spec.js | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index 7ccce3214c..8c52318b47 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -48,7 +48,6 @@ "unicorn/prefer-number-properties": "off", "unicorn/prefer-query-selector": "off", "unicorn/prefer-set-has": "off", - "unicorn/prefer-text-content": "off", "unicorn/prevent-abbreviations": "off" } } diff --git a/js/src/tooltip.js b/js/src/tooltip.js index c493b15eeb..9a1dff3d6e 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -421,7 +421,7 @@ class Tooltip { element.appendChild(content) } } else { - element.innerText = content.textContent + element.textContent = content.textContent } return @@ -434,7 +434,7 @@ class Tooltip { element.innerHTML = content } else { - element.innerText = content + element.textContent = content } } diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js index ed89315e0b..5e3bb93261 100644 --- a/js/tests/unit/tooltip.spec.js +++ b/js/tests/unit/tooltip.spec.js @@ -913,7 +913,7 @@ describe('Tooltip', () => { tooltip.setElementContent(tooltip.getTipElement(), 'test') - expect(tooltip.getTipElement().innerText).toEqual('test') + expect(tooltip.getTipElement().textContent).toEqual('test') }) }) |