Skip to content

Commit 209294c

Browse files
MarcusNotheiskskondov
authored andcommitted
refactor(RTL config): assume RTL is false when no document is available (#6454)
1 parent ed86be9 commit 209294c

File tree

1 file changed

+4
-0
lines changed
  • packages/base/src/config

1 file changed

+4
-0
lines changed

packages/base/src/config/RTL.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ const impliesRTL = (language: string) => {
2929
* @returns {boolean} whether RTL should be used
3030
*/
3131
const getRTL = (): boolean => {
32+
if (typeof document === "undefined") {
33+
return false;
34+
}
35+
3236
const configurationRTL = getConfiguredRTL();
3337

3438
if (configurationRTL !== undefined) {

0 commit comments

Comments
 (0)