Avoided boards from navigating to URL not belonging to it (#1460)

This commit is contained in:
Harshil Sharma 2021-10-06 14:11:47 +05:30 committed by GitHub
parent e0935eb15c
commit 7ca76b9db1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,10 +47,11 @@ if (Utils.isDesktop() && Utils.isFocalboardPlugin()) {
} }
const pathName = event.data.message?.pathName const pathName = event.data.message?.pathName
if (!pathName) { if (!pathName || !pathName.startsWith((window as any).frontendBaseURL)) {
return return
} }
Utils.log(`Navigating Boards to ${pathName}`)
history.replace(pathName.replace((window as any).frontendBaseURL, '')) history.replace(pathName.replace((window as any).frontendBaseURL, ''))
}) })
} }