mirror of
https://github.com/janishutz/MusicPlayerV2.git
synced 2025-11-26 21:34:23 +00:00
backend
This commit is contained in:
@@ -285,8 +285,12 @@
|
||||
fetch( 'http://localhost:8081/openSongs' ).then( res => {
|
||||
if ( res.status === 200 ) {
|
||||
res.json().then( json => {
|
||||
this.loadedDirs = json.data;
|
||||
this.indexFiles();
|
||||
if ( Object.keys( json ).length > 0 ) {
|
||||
this.loadedDirs = json.data;
|
||||
this.indexFiles();
|
||||
} else {
|
||||
this.isLoadingSongs = false;
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user