Fix tsc and sketch error
This commit is contained in:
@ -591,7 +591,7 @@ export class SceneEntities {
|
||||
const sg = kclManager.programMemory.get(
|
||||
variableDeclarationName
|
||||
) as SketchGroup
|
||||
const lastSeg = sg.value.slice(-1)[0] || sg.start
|
||||
const lastSeg = sg?.value?.slice(-1)[0] || sg.start
|
||||
|
||||
const index = sg.value.length // because we've added a new segment that's not in the memory yet, no need for `-1`
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ export class MachineManager {
|
||||
// Start a background job to update the machines every ten seconds.
|
||||
// If MDNS is already watching, this timeout will wait until it's done to trigger the
|
||||
// finding again.
|
||||
let timeoutId = undefined
|
||||
let timeoutId: ReturnType<typeof setTimeout> | undefined = undefined
|
||||
const timeoutLoop = () => {
|
||||
clearTimeout(timeoutId)
|
||||
timeoutId = setTimeout(async () => {
|
||||
|
||||
Reference in New Issue
Block a user