Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: fix refresh interval constraint (#4528)

Mark Blakeney395b88767cd9
diff --git a/frontend/src/plugins/impl/RefreshPlugin.tsx b/frontend/src/plugins/impl/RefreshPlugin.tsx
index 174e96306e..a50820f44b 100644
--- a/frontend/src/plugins/impl/RefreshPlugin.tsx
+++ b/frontend/src/plugins/impl/RefreshPlugin.tsx
@@ -103,8 +103,8 @@ const RefreshComponent = ({ setValue, data }: IPluginProps<Value, Data>) => {
? timestring(selected)
: timestring(`${selected}s`); // default to seconds if no units
- // Smallest interval is 1 second
- asSeconds = Math.max(asSeconds, 1);
+ // Constrain to smallest interval
+ asSeconds = Math.max(asSeconds, MIN_INTERVAL);
const id = setInterval(refresh, asSeconds * 1000);
return () => clearInterval(id);