Skip to content

Commit

Permalink
Fix issues with plugin-docusaurus-v3 detecting local mode. (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
dezlitz authored Sep 4, 2024
1 parent 980eb58 commit 92b03fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-docusaurus-v3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function OramaPluginDocusaurus(
},

async allContentLoaded({ actions, allContent }) {
const isDevelopment = process.env.NODE_ENV === 'development' || !options.cloud?.oramaCloudAPIKey
const isDevelopment = process.env.NODE_ENV === 'development' || (options.cloud && !options.cloud?.oramaCloudAPIKey)
const docsInstances: string[] = []
const oramaCloudAPIKey = options.cloud?.oramaCloudAPIKey
const searchDataConfig = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const useOrama = () => {
const isBrowser = useIsBrowser()
useEffect(() => {
async function loadOrama() {
if (endpoint) {
if (endpoint?.url) {
setSearchBoxConfig({
oramaInstance: new OramaClient({
endpoint: endpoint.url,
Expand Down

0 comments on commit 92b03fa

Please sign in to comment.