Fix lint after #6558 (#6562)

This commit is contained in:
Pierre Jacquier
2025-04-29 01:23:50 -04:00
committed by GitHub
parent aca5fdb521
commit 4d2bc18c2f
3 changed files with 38 additions and 27 deletions

View File

@ -9,7 +9,10 @@ import {
useRequestedTextToCadGeneration,
useFolders,
} from '@src/machines/systemIO/hooks'
import { NO_PROJECT_DIRECTORY, SystemIOMachineEvents } from '@src/machines/systemIO/utils'
import {
NO_PROJECT_DIRECTORY,
SystemIOMachineEvents,
} from '@src/machines/systemIO/utils'
import { useNavigate } from 'react-router-dom'
import { useEffect } from 'react'
import { submitAndAwaitTextToKclSystemIO } from '@src/lib/textToCad'
@ -96,9 +99,14 @@ export function SystemIOMachineLogicListenerDesktop() {
return
}
const folderName = systemIOActor.getSnapshot().context.lastProjectDeleteRequest.project
const folderName =
systemIOActor.getSnapshot().context.lastProjectDeleteRequest.project
const folderPath = `${projectDirectoryPath}${window.electron.sep}${folderName}`
if (folderName !== NO_PROJECT_DIRECTORY && (eventType === 'unlinkDir' || eventType === 'unlink') && path.includes(folderPath)) {
if (
folderName !== NO_PROJECT_DIRECTORY &&
(eventType === 'unlinkDir' || eventType === 'unlink') &&
path.includes(folderPath)
) {
// NO OP: The systemIOMachine will be triggering the read in the state transition, don't spam it again
// once this event is processed after the deletion.
} else {