Skip to content

Commit

Permalink
fix: do not migrate extensions from quick ask window (janhq#2336)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Mar 12, 2024
1 parent 2082b81 commit e5369ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/containers/Providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { PropsWithChildren, useEffect, useState } from 'react'

import { Toaster } from 'react-hot-toast'

import { usePathname } from 'next/navigation'

import { TooltipProvider } from '@janhq/uikit'

import GPUDriverPrompt from '@/containers/GPUDriverPromptModal'
Expand All @@ -29,6 +31,7 @@ import { extensionManager } from '@/extension'

const Providers = (props: PropsWithChildren) => {
const { children } = props
const pathname = usePathname()

const [setupCore, setSetupCore] = useState(false)
const [activated, setActivated] = useState(false)
Expand All @@ -40,6 +43,11 @@ const Providers = (props: PropsWithChildren) => {

setTimeout(async () => {
if (!isCoreExtensionInstalled()) {
// TODO: Proper window handle
// Do not migrate extension from quick ask window
if (pathname === '/search') {
return
}
setSettingUp(true)
await setupBaseExtensions()
return
Expand Down

0 comments on commit e5369ed

Please sign in to comment.