Skip to content

Commit 31832ac

Browse files
author
Orta Therox
authored
Merge pull request #1510 from microsoft/save_jsx_params_before_reload
Save the JSX params before a reload
2 parents 16f7062 + 0cf904b commit 31832ac

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/playground/src/createConfigDropdown.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export const createConfigDropdown = (sandbox: Sandbox, monaco: Monaco) => {
9898
const isNowJSX = internalSwitch.selectedIndex !== 0
9999
const isJSX = sandbox.filepath.endsWith("x")
100100
if (isNowJSX !== isJSX) {
101+
const newURL = sandbox.createURLQueryWithCompilerOptions(sandbox)
102+
window.history.replaceState({}, "", newURL)
101103
setTimeout(() => document.location.reload(), 300)
102104
}
103105
})

packages/typescriptlang-org/src/pages/dev/bug-workbench.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const Play: React.FC<Props> = (props) => {
111111
dtsMap = defaultMap
112112
runTwoslash()
113113
})
114+
114115
}
115116

116117
// When the compiler notices a twoslash compiler flag change, this will get triggered and reset the DTS map

0 commit comments

Comments
 (0)