Fix async empty notebook infinite loading
This commit is contained in:
parent
24870a5769
commit
c4ca019c8e
1 changed files with 3 additions and 0 deletions
|
|
@ -118,6 +118,9 @@ export function loadNotesAsync(notebook, callback){
|
||||||
var notes = []
|
var notes = []
|
||||||
|
|
||||||
glob(noteGlob, (err, notePaths) => {
|
glob(noteGlob, (err, notePaths) => {
|
||||||
|
if (notePaths.length == 0){
|
||||||
|
callback(notes)
|
||||||
|
}
|
||||||
for(var i=0; i<notePaths.length; i++){
|
for(var i=0; i<notePaths.length; i++){
|
||||||
var notePath = notePaths[i]
|
var notePath = notePaths[i]
|
||||||
loadNoteAsync(notePath, (note) => {
|
loadNoteAsync(notePath, (note) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue