refactor: remove unnecessary assertion (#2579)

This commit is contained in:
Noritaka Kobayashi
2025-06-30 04:06:03 +09:00
committed by GitHub
parent 65a58c3b03
commit 9ae2595bfd
6 changed files with 9 additions and 31 deletions

View File

@@ -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;
}