mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 16:40:05 +00:00
nit - Remove redundant code
This commit is contained in:
@@ -50,7 +50,7 @@ import { electronAPI as getElectronAPI, isElectron } from '@/utils/envUtil'
|
||||
if (!oldValue) return
|
||||
|
||||
// Custom window mode requires the Top menu.
|
||||
if (newValue === 'custom' && oldValue !== newValue) {
|
||||
if (newValue === 'custom') {
|
||||
useSettingStore().set('Comfy.UseNewMenu', 'Top')
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ import { electronAPI as getElectronAPI, isElectron } from '@/utils/envUtil'
|
||||
oldValue?: 'Disabled' | 'Top' | 'Bottom'
|
||||
) => {
|
||||
const style = useSettingStore().get('Comfy-Desktop.WindowStyle')
|
||||
if (oldValue === 'Top' && newValue !== oldValue && style === 'custom') {
|
||||
if (oldValue === 'Top' && style === 'custom') {
|
||||
useSettingStore().set('Comfy-Desktop.WindowStyle', 'default')
|
||||
}
|
||||
return onChange?.(newValue, oldValue)
|
||||
|
||||
Reference in New Issue
Block a user