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

rusackas pushed a commit to branch scarf-pixel
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/scarf-pixel by this push:
     new 9e7a8daaec restoring shim ¯\_(ツ)_/¯
9e7a8daaec is described below

commit 9e7a8daaecf48663fa98efe76f20c1cc5db23b2a
Author: Evan Rusackas <[email protected]>
AuthorDate: Tue Nov 28 13:16:52 2023 -0700

    restoring shim ¯\_(ツ)_/¯
---
 superset-frontend/spec/helpers/shim.tsx | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/superset-frontend/spec/helpers/shim.tsx 
b/superset-frontend/spec/helpers/shim.tsx
index 810df292a0..152fcc370c 100644
--- a/superset-frontend/spec/helpers/shim.tsx
+++ b/superset-frontend/spec/helpers/shim.tsx
@@ -48,17 +48,15 @@ if (defaultView != null) {
 }
 
 const g = global as any;
-if (typeof window === 'undefined') {
-  g.window = {};
-  g.window.location = { href: 'about:blank' };
-  g.window.performance = { now: () => new Date().getTime() };
-  g.window.Worker = Worker;
-  g.window.IntersectionObserver = IntersectionObserver;
-  g.window.ResizeObserver = ResizeObserver;
-  g.window.featureFlags = {};
-  g.URL.createObjectURL = () => '';
-  g.caches = new CacheStorage();
-}
+g.window = g.window || {};
+g.window.location = { href: 'about:blank' };
+g.window.performance = { now: () => new Date().getTime() };
+g.window.Worker = Worker;
+g.window.IntersectionObserver = IntersectionObserver;
+g.window.ResizeObserver = ResizeObserver;
+g.window.featureFlags = {};
+g.URL.createObjectURL = () => '';
+g.caches = new CacheStorage();
 
 Object.defineProperty(window, 'matchMedia', {
   writable: true,

Reply via email to