Skip to content

Commit

Permalink
refactor: fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Jan 22, 2025
1 parent 665c309 commit 159f2a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/classes/emulator-file-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class EmulatorFileSystem {
}
retryTimes += 1
}
if (!isFinished) {
if (!(isFinished && buffer)) {
throw new Error('fs timeout')
}
return buffer
Expand Down
4 changes: 2 additions & 2 deletions src/classes/emulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ export class Emulator {
this.clearStateFile()
this.sendCommand('SAVE_STATE')
const savestateThumbnailEnable = this.options.retroarchConfig.savestate_thumbnail_enable
let stateBuffer: Buffer
let stateThumbnailBuffer: Buffer | undefined
let stateBuffer: Uint8Array
let stateThumbnailBuffer: Uint8Array | undefined
if (savestateThumbnailEnable) {
;[stateBuffer, stateThumbnailBuffer] = await Promise.all([
this.fs.waitForFile(this.stateFilePath),
Expand Down

0 comments on commit 159f2a9

Please sign in to comment.