Need a default view mode selection if null

This commit is contained in:
Lim Chee Aun 2023-03-16 00:33:58 +08:00
parent aaf12e2c47
commit e0688afdfc

View file

@ -235,7 +235,11 @@ function ShortcutsSettings() {
type="radio"
name="shortcuts-view-mode"
value={value}
checked={snapStates.settings.shortcutsViewMode === value}
checked={
snapStates.settings.shortcutsViewMode === value ||
(value === 'float-button' &&
!snapStates.settings.shortcutsViewMode)
}
onChange={(e) => {
states.settings.shortcutsViewMode = e.target.value;
}}