mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
fix: use startsWith for prefix matching in protected keys
Prevents false positives from substring matches
This commit is contained in:
@@ -12,7 +12,7 @@ const MAX_EVICTION_ATTEMPTS = 3
|
|||||||
const PROTECTED_KEY_PREFIXES = ['workspace.', 'Workspace.']
|
const PROTECTED_KEY_PREFIXES = ['workspace.', 'Workspace.']
|
||||||
|
|
||||||
function isProtectedKey(key: string): boolean {
|
function isProtectedKey(key: string): boolean {
|
||||||
return PROTECTED_KEY_PREFIXES.some((prefix) => key.includes(prefix))
|
return PROTECTED_KEY_PREFIXES.some((prefix) => key.startsWith(prefix))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user