fix(document-page): add .catch() to task deep-link tick promise
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 3m23s
CI / OCR Service Tests (pull_request) Successful in 29s
CI / Backend Unit Tests (pull_request) Failing after 3m0s
CI / Unit & Component Tests (push) Failing after 3m17s
CI / OCR Service Tests (push) Successful in 34s
CI / Backend Unit Tests (push) Failing after 3m19s
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 3m23s
CI / OCR Service Tests (pull_request) Successful in 29s
CI / Backend Unit Tests (pull_request) Failing after 3m0s
CI / Unit & Component Tests (push) Failing after 3m17s
CI / OCR Service Tests (push) Successful in 34s
CI / Backend Unit Tests (push) Failing after 3m19s
Addresses @felix — tick().then() had no error handler; console.error is now logged on failure, matching the existing deep-link scroll pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -364,7 +364,8 @@ onMount(() => {
|
|||||||
|
|
||||||
if (page.url.searchParams.get('task') === 'transcribe') {
|
if (page.url.searchParams.get('task') === 'transcribe') {
|
||||||
transcribeMode = true;
|
transcribeMode = true;
|
||||||
tick().then(() => {
|
tick()
|
||||||
|
.then(() => {
|
||||||
const closeBtn = document.querySelector<HTMLElement>('[data-testid="panel-close"]');
|
const closeBtn = document.querySelector<HTMLElement>('[data-testid="panel-close"]');
|
||||||
closeBtn?.scrollIntoView({
|
closeBtn?.scrollIntoView({
|
||||||
behavior: prefersReducedMotion ? 'instant' : 'smooth',
|
behavior: prefersReducedMotion ? 'instant' : 'smooth',
|
||||||
@@ -372,7 +373,8 @@ onMount(() => {
|
|||||||
});
|
});
|
||||||
closeBtn?.focus({ preventScroll: true });
|
closeBtn?.focus({ preventScroll: true });
|
||||||
replaceState(page.url.pathname, page.state ?? {});
|
replaceState(page.url.pathname, page.state ?? {});
|
||||||
});
|
})
|
||||||
|
.catch((e) => console.error('task deep-link failed', e));
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollToCommentFromQuery(new URL(page.url), {
|
scrollToCommentFromQuery(new URL(page.url), {
|
||||||
|
|||||||
Reference in New Issue
Block a user