handle thumbnails length 0
This commit is contained in:
parent
197336d42d
commit
9b03d97d2c
1 changed files with 2 additions and 4 deletions
|
@ -17,11 +17,9 @@ const GridItem = ({ c, path }: { c: OdFolderChildren; path: string }) => {
|
||||||
'folder' in c
|
'folder' in c
|
||||||
? // Folders don't have thumbnails
|
? // Folders don't have thumbnails
|
||||||
null
|
null
|
||||||
: c.thumbnails
|
: c.thumbnails && c.thumbnails.length > 0
|
||||||
? // Most OneDrive versions, including E5 developer, should have thumbnails returned
|
? // Most OneDrive versions, including E5 developer, should have thumbnails returned
|
||||||
c.thumbnails.length > 0
|
c.thumbnails[0].medium.url
|
||||||
? c.thumbnails[0].medium.url
|
|
||||||
: null
|
|
||||||
: // According to OneDrive docs, OneDrive for Business and SharePoint does not
|
: // According to OneDrive docs, OneDrive for Business and SharePoint does not
|
||||||
// (can not retrieve thumbnails via expand). But currently we only see OneDrive 世纪互联 really does not.
|
// (can not retrieve thumbnails via expand). But currently we only see OneDrive 世纪互联 really does not.
|
||||||
`/api/thumbnail?path=${path}`
|
`/api/thumbnail?path=${path}`
|
||||||
|
|
Loading…
Reference in a new issue