Skip to content

Commit a621dd2

Browse files
authored
Feature javascript filter fix - fixes #2110 (#2112)
* Javascript/js instead of JavaScript/js (as defined in js-controller) - see #2110 * SideMenu typeFilter is case insensitive
1 parent dba68e9 commit a621dd2

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src-editor/src/SideMenu.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,11 @@ export default class SideDrawer extends React.Component<SideDrawerProps, SideDra
10811081
return true;
10821082
}
10831083

1084-
if (this.state.typeFilter && item.type !== 'folder' && item.type !== this.state.typeFilter) {
1084+
if (
1085+
this.state.typeFilter &&
1086+
item.type !== 'folder' &&
1087+
item.type.toLowerCase() !== this.state.typeFilter.toLowerCase()
1088+
) {
10851089
return true;
10861090
}
10871091

src/lib/mirror.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export class Mirror {
213213
if (fileName.endsWith('.ts')) {
214214
return 'TypeScript/ts';
215215
}
216-
return Mirror.isBlockly(data) ? 'Blockly' : Mirror.isRules(data) ? 'Rules' : 'JavaScript/js';
216+
return Mirror.isBlockly(data) ? 'Blockly' : Mirror.isRules(data) ? 'Rules' : 'Javascript/js';
217217
}
218218

219219
updateFolderTime(id: string): void {

src/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export type JavascriptTimer = {
5959
ack?: boolean;
6060
};
6161

62-
export type ScriptType = 'TypeScript/ts' | 'Blockly' | 'Rules' | 'JavaScript/js';
62+
export type ScriptType = 'TypeScript/ts' | 'Blockly' | 'Rules' | 'Javascript/js';
6363

6464
export type TimeRule = {
6565
time: string | { hour: number; minute: number };

0 commit comments

Comments
 (0)