mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
update: safe fallback.
This commit is contained in:
1 parent
6060c510cc
commit
3aa2e2b420
1 file changed
+4
-1
+4
-1
@@ -348,7 +348,10 @@
|
||||
columnsWithBase.reduce((sum, col) => sum + col.baseWidth, 0);
|
||||
|
||||
// distribute excess space equally across custom columns
|
||||
const viewportWidth = spreadsheetContainer?.clientWidth || window.innerWidth;
|
||||
const viewportWidth =
|
||||
spreadsheetContainer?.clientWidth ||
|
||||
(typeof window !== 'undefined' ? window.innerWidth : totalUsed);
|
||||
|
||||
const extraPerColumn =
|
||||
Math.max(0, viewportWidth - totalUsed) / (columnsWithBase.length || 1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user