Add 404 page to content locator

Resolves MS-654 #complete
This commit is contained in:
Ramon Wenger 2023-02-22 16:11:42 +01:00
parent 43eb083270
commit 35ae879d46
1 changed files with 5 additions and 2 deletions

View File

@ -35,10 +35,13 @@ const { onResult } = useQuery(query, () => ({ id: props.id }));
onResult(({ data }) => {
let path;
try {
if (data.chapter) {
path = data.chapter.path;
} catch (e) {
} else if (data.contentBlock) {
path = data.contentBlock.path;
} else {
router.push({ name: 'not-found' });
return;
}
router.push(`/${path}`);
});