matteomarjanovic commited on
Commit
88ff9cc
·
1 Parent(s): bef7d76

fix light forcing

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -126,8 +126,10 @@ js_func = """
126
  function refresh() {
127
  const url = new URL(window.location);
128
 
129
- url.searchParams.set('__theme', 'light');
130
- window.location.href = url.href;
 
 
131
  }
132
  """
133
 
 
126
  function refresh() {
127
  const url = new URL(window.location);
128
 
129
+ if (url.searchParams.get('__theme') !== 'light') {
130
+ url.searchParams.set('__theme', 'light');
131
+ window.location.href = url.href;
132
+ }
133
  }
134
  """
135