You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/06/05 16:16:27 UTC

[superset] branch master updated: fix: Text utils null value when reading module (#24291)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a1f365d9b fix: Text utils null value when reading module (#24291)
6a1f365d9b is described below

commit 6a1f365d9b7a89cb316e6781317a60f0cb4fcb30
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Mon Jun 5 13:16:16 2023 -0300

    fix: Text utils null value when reading module (#24291)
---
 superset-frontend/src/utils/textUtils.ts | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/superset-frontend/src/utils/textUtils.ts b/superset-frontend/src/utils/textUtils.ts
index 4da82b6745..bfe875cac4 100644
--- a/superset-frontend/src/utils/textUtils.ts
+++ b/superset-frontend/src/utils/textUtils.ts
@@ -15,17 +15,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
-/* eslint-disable global-require */
 const loadModule = () => {
-  let module;
   try {
-    // @ts-ignore
-    module = require('../../../superset_text'); // eslint-disable-line import/no-unresolved
+    // eslint-disable-next-line global-require
+    return require('../../../superset_text.yml') || {};
   } catch (e) {
-    module = {};
+    return {};
   }
-  return module;
 };
 
 const supersetText = loadModule();