From 4e9377166b6e6f53e4687b49d24d7f52cc68e26a Mon Sep 17 00:00:00 2001 From: Marcus Notheis Date: Thu, 9 Feb 2023 14:50:07 +0100 Subject: [PATCH] refactor(RTL config): assume RTL is false when no document is available --- packages/base/src/config/RTL.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/base/src/config/RTL.ts b/packages/base/src/config/RTL.ts index 1576764fc9a7..df163b6165f1 100644 --- a/packages/base/src/config/RTL.ts +++ b/packages/base/src/config/RTL.ts @@ -29,6 +29,10 @@ const impliesRTL = (language: string) => { * @returns {boolean} whether RTL should be used */ const getRTL = (): boolean => { + if (typeof document === "undefined") { + return false; + } + const configurationRTL = getConfiguredRTL(); if (configurationRTL !== undefined) {