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

shuai pushed a commit to branch feat/1.3.1/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/feat/1.3.1/ui by this push:
     new 8f258711 fix: disable react-devtools
8f258711 is described below

commit 8f2587118b5d409fc2641b2f33a8f4a2145148eb
Author: shuai <[email protected]>
AuthorDate: Fri Apr 19 11:15:22 2024 +0800

    fix: disable react-devtools
---
 ui/public/index.html | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/public/index.html b/ui/public/index.html
index f5a9c141..f15dd970 100644
--- a/ui/public/index.html
+++ b/ui/public/index.html
@@ -89,6 +89,10 @@
     </div>
   </body>
   <script>
+    // disable react devtools
+    if (typeof window.__REACT_DEVTOOLS_GLOBAL_HOOK__ === 'object') {
+      window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject = function () {};
+    }
     /**
      * @description: Prompt that the browser version is too low
     */

Reply via email to