File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
frontend/src/ts/test/funbox Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import * as FunboxMemory from "./funbox-memory";
99import { HighlightMode } from "@monkeytype/contracts/schemas/configs" ;
1010import { Mode } from "@monkeytype/contracts/schemas/shared" ;
1111import { FunboxName , checkCompatibility } from "@monkeytype/funbox" ;
12- import { getActiveFunboxes , getActiveFunboxNames } from "./list" ;
12+ import { getActiveFunboxes , getActiveFunboxNames , get } from "./list" ;
1313import { checkForcedConfig } from "./funbox-validation" ;
1414
1515export function toggleScript ( ...params : string [ ] ) : void {
@@ -51,12 +51,10 @@ export function toggleFunbox(funbox: "none" | FunboxName): boolean {
5151 FunboxMemory . load ( ) ;
5252 const e = UpdateConfig . toggleFunbox ( funbox , false ) ;
5353
54- for ( const fb of getActiveFunboxes ( ) ) {
55- if ( ! Config . funbox . includes ( funbox ) ) {
56- fb . functions ?. clearGlobal ?.( ) ;
57- } else {
58- fb . functions ?. applyGlobalCSS ?.( ) ;
59- }
54+ if ( ! getActiveFunboxNames ( ) . includes ( funbox as FunboxName ) ) {
55+ get ( funbox as FunboxName ) . functions ?. clearGlobal ?.( ) ;
56+ } else {
57+ get ( funbox as FunboxName ) . functions ?. applyGlobalCSS ?.( ) ;
6058 }
6159
6260 //todo find out what the hell this means
You can’t perform that action at this time.
0 commit comments