mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
refactor: remove unnecessary assertion (#2579)
This commit is contained in:
committed by
GitHub
parent
65a58c3b03
commit
9ae2595bfd
@@ -75,10 +75,7 @@ export function allowEditorTypeInSandbox(editor: EditorType): boolean {
|
||||
*/
|
||||
export function isEditorAvailable(editor: string | undefined): boolean {
|
||||
if (editor && isValidEditorType(editor)) {
|
||||
return (
|
||||
checkHasEditorType(editor as EditorType) &&
|
||||
allowEditorTypeInSandbox(editor as EditorType)
|
||||
);
|
||||
return checkHasEditorType(editor) && allowEditorTypeInSandbox(editor);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user