We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd6d862 commit 19c2743Copy full SHA for 19c2743
packages/compass/src/app/application.tsx
@@ -389,16 +389,14 @@ class Application {
389
}, SAVE_DEBOUNCE_DELAY);
390
};
391
392
+ // Restore saved zoom level
393
const restoreZoomLevel = () => {
394
try {
395
const preferences = defaultPreferencesInstance.getPreferences();
396
const savedZoomLevel = preferences.zoomLevel ?? ZOOM_DEFAULT;
397
- // Clamp zoom level to allowed range
398
- const zoomLevel = Math.min(
399
- Math.max(savedZoomLevel, ZOOM_MIN),
400
- ZOOM_MAX
401
- );
+ // Use saved zoom level only if it's within valid range
+ const zoomLevel = Math.min(Math.max(savedZoomLevel, ZOOM_MIN), ZOOM_MAX);
402
403
webFrame.setZoomLevel(zoomLevel);
404
} catch {
0 commit comments