fix(play): throw AbortError on cancelled prefetch to avoid false analytics

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
yuanzonghao
2026-06-13 19:09:04 +08:00
parent 0998f7c46a
commit ccdb4780d6
+1 -1
View File
@@ -375,7 +375,7 @@ function prefetchScenePath(
const prefetchT0 = Date.now(); const prefetchT0 = Date.now();
const promise = (async () => { const promise = (async () => {
const data = await requestScene({ session: specSession, clientTts }); const data = await requestScene({ session: specSession, clientTts });
if (abort.signal.aborted) throw new Error("aborted"); if (abort.signal.aborted) throw new DOMException("aborted", "AbortError");
// Record this resolved alternate for the gallery export. Key is // Record this resolved alternate for the gallery export. Key is
// (parent scene id at the choice point) : (choice id). Includes the // (parent scene id at the choice point) : (choice id). Includes the