10000 No need to validate language here. (#935) · nsavas2000/python-editor-v3@96d0a44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96d0a44

Browse files
No need to validate language here. (microbit-foundation#935)
Intended as part of microbit-foundation#933
1 parent a44fb2b commit 96d0a44

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/workbench/WelcomeDialog.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ const WelcomeDialog = ({ isOpen, onClose }: WelcomeDialogProps) => {
4040
return result[0].welcomeVideo;
4141
}
4242
};
43-
const query = (languageId: string): string => {
44-
if (!languageId.match(/^[a-z-]+$/g)) {
45-
throw new Error("Invalid language id.");
46-
}
47-
// Ready to use languageId here if the alt field is made translatable.
43+
const query = (): string => {
4844
return `
4945
*[_id == "pythonEditorConfig" && !(_id in path("drafts.**"))]{
5046
welcomeVideo

0 commit comments

Comments
 (0)
0