Ensure that the proper editor is updated by syncing

This commit is contained in:
nickofolas 2022-01-20 17:45:54 -06:00
parent a5ad97f47d
commit 1a8a24587f

@ -709,6 +709,9 @@ export function Root(props: IProps): React.ReactElement {
// Save changes
openScript.code = serverScriptCode;
// Switch to target tab
onTabClick(index)
if (editorRef.current !== null && openScript !== null) {
if (openScript.model === undefined || openScript.model.isDisposed()) {
regenerateModel(openScript);