浏览代码

Fix breadcrumbs (#4986)

ProviderView.tsx - fix onedrive breadcrumbs
Evgenia Karunus 1 年之前
父节点
当前提交
1c1062a9cc
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      packages/@uppy/core/src/Uppy.ts
  2. 1 1
      packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx

+ 1 - 1
packages/@uppy/core/src/Uppy.ts

@@ -64,7 +64,7 @@ export type UnknownPlugin<
 export type UnknownProviderPluginState = {
   authenticated: boolean | undefined
   breadcrumbs: {
-    requestPath: string
+    requestPath?: string
     name?: string
     id?: string
   }[]

+ 1 - 1
packages/@uppy/provider-views/src/ProviderView/ProviderView.tsx

@@ -233,7 +233,7 @@ export default class ProviderView<M extends Meta, B extends Body> extends View<
         if (index !== -1) {
           // means we navigated back to a known directory (already in the stack), so cut the stack off there
           breadcrumbs = breadcrumbs.slice(0, index + 1)
-        } else if (requestPath) {
+        } else {
           // we have navigated into a new (unknown) folder, add it to the stack
           breadcrumbs = [...breadcrumbs, { requestPath, name }]
         }