Skip to content

Commit 8c678fd

Browse files
author
socrateslee
committed
fix a bug when folder possibly be null
1 parent 0226801 commit 8c678fd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

js/mdreader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
if(index === -1){
7474
return '';
7575
}
76+
if(fileObject.parents.length < 1){
77+
return '';
78+
}
7679
var base = fileObject.alternateLink.substring(0, index);
7780
var folderId = fileObject.parents[fileObject.parents.length-1].id;
7881
return base + "/?authuser=" + authuserIndex.toString() + "#folders/" + folderId;

0 commit comments

Comments
 (0)