From 09ad319cdc92809e77078c600f3f8a28c40b942f Mon Sep 17 00:00:00 2001 From: yanaminkova Date: Fri, 25 Aug 2023 13:35:24 +0300 Subject: [PATCH 1/2] fix: console error --- app/vendor/ToolsAPI.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/app/vendor/ToolsAPI.js b/app/vendor/ToolsAPI.js index c6f6b44..3dd064a 100644 --- a/app/vendor/ToolsAPI.js +++ b/app/vendor/ToolsAPI.js @@ -63,13 +63,17 @@ sap.ui.define(["jquery.sap.global", "sap/ui/core/ElementMetadata"], function _getDebugModeInfo() { // check URI param - var vDebugInfo = BaseConfig.get({ - name: 'sapUiDebug', - type: BaseConfig.Type.String, - defaultValue: false, - external: true, - freeze: true - }); + var vDebugInfo; + + if (BaseConfig) { + vDebugInfo = BaseConfig.get({ + name: 'sapUiDebug', + type: BaseConfig.Type.String, + defaultValue: false, + external: true, + freeze: true + }); + } // check local storage try { From c84261f2b9090956319bfc5695d3b09d40b10183 Mon Sep 17 00:00:00 2001 From: yanaminkova Date: Fri, 25 Aug 2023 15:26:36 +0300 Subject: [PATCH 2/2] fix: console error --- app/vendor/ToolsAPI.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/vendor/ToolsAPI.js b/app/vendor/ToolsAPI.js index 3dd064a..f87f5f2 100644 --- a/app/vendor/ToolsAPI.js +++ b/app/vendor/ToolsAPI.js @@ -63,18 +63,19 @@ sap.ui.define(["jquery.sap.global", "sap/ui/core/ElementMetadata"], function _getDebugModeInfo() { // check URI param - var vDebugInfo; - - if (BaseConfig) { - vDebugInfo = BaseConfig.get({ - name: 'sapUiDebug', - type: BaseConfig.Type.String, - defaultValue: false, - external: true, - freeze: true - }); + + if (!BaseConfig) { + return false; } + var vDebugInfo = BaseConfig.get({ + name: 'sapUiDebug', + type: BaseConfig.Type.String, + defaultValue: false, + external: true, + freeze: true + }); + // check local storage try { vDebugInfo = vDebugInfo || window.localStorage.getItem('sap-ui-debug');