Skip to content

Commit

Permalink
Merge pull request #137 from arduino/bugfix/stuck-in-loading
Browse files Browse the repository at this point in the history
Stuck in loading files
  • Loading branch information
murilopolese authored Nov 5, 2024
2 parents f99cba5 + 8192bbf commit 169a01a
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions ui/arduino/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,24 +406,36 @@ async function store(state, emitter) {
emitter.emit('render')

if (state.isConnected) {
state.boardFiles = await getBoardFiles(
serial.getFullPath(
state.boardNavigationRoot,
state.boardNavigationPath,
''
try {
state.boardFiles = await getBoardFiles(
serial.getFullPath(
state.boardNavigationRoot,
state.boardNavigationPath,
''
)
)
)
} catch (e) {
state.boardFiles = []
}
} else {
state.boardFiles = []
}

state.diskFiles = await getDiskFiles(
disk.getFullPath(
state.diskNavigationRoot,
state.diskNavigationPath,
''
try {
state.diskFiles = await getDiskFiles(
disk.getFullPath(
state.diskNavigationRoot,
state.diskNavigationPath,
''
)
)
)
} catch (e) {
state.diskNavigationRoot = null
state.diskNavigationPath = '/'
state.isLoadingFiles = false
emitter.emit('render')
return
}

emitter.emit('refresh-selected-files')
state.isLoadingFiles = false
Expand Down

0 comments on commit 169a01a

Please sign in to comment.