This commit is contained in:
Olivier Gagnon
2022-05-25 11:43:43 -04:00
parent 6fef46d5df
commit 76ccb0ba36
25 changed files with 38 additions and 41 deletions

View File

@@ -693,7 +693,7 @@ export function Root(props: IProps): React.ReactElement {
if (server === null) throw new Error(`Server '${closingScript.hostname}' should not be null, but it is.`);
const serverScriptIndex = server.scripts.findIndex((script) => script.filename === closingScript.fileName);
if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex as number].code) {
if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex ].code) {
PromptEvent.emit({
txt: `Do you want to save changes to ${closingScript.fileName} on ${closingScript.hostname}?`,
resolve: (result: boolean | string) => {