Skip to content

Commit b86b150

Browse files
committed
(bug) Handle cancel action when opening files
Before it would just clear your library.
1 parent 396f4cc commit b86b150

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

renderer/player/elements/header/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Header extends Component {
7676

7777
handlePaths ({ filePaths }) {
7878
this.dialogOpen = false
79-
if (filePaths) {
79+
if (Array.isArray(filePaths) && filePaths.length > 0) {
8080
this.emit('config:set', { filePaths })
8181
this.emit('library:update-library', filePaths)
8282
}

0 commit comments

Comments
 (0)