diff --git a/components/Navbar.tsx b/components/Navbar.tsx
index 3c24540..d2c09bf 100644
--- a/components/Navbar.tsx
+++ b/components/Navbar.tsx
@@ -75,10 +75,10 @@ const Navbar = () => {
-
+
{os === 'mac' ? '⌘' : 'Ctrl'}
-
K
+
K
diff --git a/components/SearchModal.tsx b/components/SearchModal.tsx
index 5b9e7ae..38aa27f 100644
--- a/components/SearchModal.tsx
+++ b/components/SearchModal.tsx
@@ -25,7 +25,14 @@ function useDriveItemSearch() {
// Map parentReference to the absolute path of the search result
data.map(item => {
- item['path'] = `${mapAbsolutePath(item.parentReference.path)}/${encodeURIComponent(item.name)}`
+ // TODO: supporting sharepoint search where the path is not returned in parentReference
+ if ('path' in item.parentReference) {
+ item['path'] = `${mapAbsolutePath(item.parentReference.path)}/${encodeURIComponent(item.name)}`
+ } else {
+ throw Error(
+ 'We currently only support search in OneDrive international. SharePoint instances are not supported yet. See issue: https://github.com/spencerwooo/onedrive-vercel-index/issues/299'
+ )
+ }
})
return data
diff --git a/pages/onedrive-vercel-index-oauth/step-2.tsx b/pages/onedrive-vercel-index-oauth/step-2.tsx
index 6cadfa6..a71986b 100644
--- a/pages/onedrive-vercel-index-oauth/step-2.tsx
+++ b/pages/onedrive-vercel-index-oauth/step-2.tsx
@@ -91,7 +91,7 @@ export default function OAuthStep2() {
/>
The authorisation code extracted is:
-
+
{authCode || Waiting for code...}