Skip to content

Commit d08dc10

Browse files
fix: unified check for multiple routes
Now we shouldn't patch opened page if it's about note settings, note history or note error
1 parent 985deb7 commit d08dc10

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/application/services/useNote.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,9 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
322322
});
323323

324324
watch(noteTitle, (currentNoteTitle) => {
325-
if (!route.path.includes('/settings')) {
325+
const routes = ['/settings', '/history', '/error'];
326+
327+
if (routes.every(rt => !route.path.includes(rt))) {
326328
patchOpenedPageByUrl(
327329
route.path,
328330
{

0 commit comments

Comments
 (0)