We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daaf454 commit 90e1850Copy full SHA for 90e1850
src/js/utils/isRTL.js
@@ -1,7 +1,3 @@
1
-export default function isRTL() {
2
- return (
3
- document.documentElement.dir === 'rtl' ||
4
- document.documentElement.lang === 'ar' ||
5
- document.documentElement.lang === 'iw'
6
- )
+export default function isRTL(container = document.documentElement) {
+ return container.dir === 'rtl' || ['ar', 'iw'].includes(container.lang)
7
}
0 commit comments