Browse Source

companion: fix shared drive icon

ifedapoolarewaju 5 years ago
parent
commit
ca6adbb0dc

+ 1 - 1
packages/@uppy/companion/src/server/provider/drive/adapter.js

@@ -21,7 +21,7 @@ exports.getItemSize = (item) => {
 }
 
 exports.getItemIcon = (item) => {
-  if (item.kind === 'drive#teamDrive') {
+  if (exports.isSharedDrive(item)) {
     const size = '=w16-h16-n'
     const sizeParamRegex = /=[-whncsp0-9]*$/
     return item.backgroundImageLink.match(sizeParamRegex)

+ 2 - 2
packages/@uppy/companion/src/server/provider/drive/index.js

@@ -70,10 +70,10 @@ class Drive {
 
     Promise.all([sharedDrivesPromise, filesPromise])
       .then(
-        ([teamDrives, filesResponse]) => {
+        ([sharedDrives, filesResponse]) => {
           const returnData = this.adaptData(
             filesResponse.body,
-            teamDrives && teamDrives.body,
+            sharedDrives && sharedDrives.body,
             options.uppy,
             directory,
             query