example regexp exec (#25200)

This commit is contained in:
Asuka Minato 2025-09-05 10:53:01 +09:00 committed by GitHub
parent f721c778ad
commit 19e1cbd033
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ const I18N_PREFIX = 'app.tracing'
const Panel: FC = () => {
const { t } = useTranslation()
const pathname = usePathname()
const matched = pathname.match(/\/app\/([^/]+)/)
const matched = /\/app\/([^/]+)/.exec(pathname)
const appId = (matched?.length && matched[1]) ? matched[1] : ''
const { isCurrentWorkspaceEditor } = useAppContext()
const readOnly = !isCurrentWorkspaceEditor