Skip to content

Commit

Permalink
Fix error caused on setHighContrast request. (#9925)
Browse files Browse the repository at this point in the history
We were calling setHighContrast in setEditorRef before setting the highContrast var to anything, so undefined was getting passed in, which then broke down the line.
  • Loading branch information
thsparks authored Mar 19, 2024
1 parent 86a050d commit 2e03a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teachertool/src/services/makecodeEditorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IframeDriver } from "pxtservices/iframeDriver";


let driver: IframeDriver | undefined;
let highContrast: boolean;
let highContrast: boolean = false;

export function setEditorRef(ref: HTMLIFrameElement | undefined) {
if (driver) {
Expand Down

0 comments on commit 2e03a51

Please sign in to comment.