Skip to content

Commit c3f3162

Browse files
hi-ogawaOpenCode
andcommitted
refactor: inline output cleanup
Co-authored-by: OpenCode <noreply@opencode.ai>
1 parent 3fef1e4 commit c3f3162

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

packages/app/src/app.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ export function App() {
9090
}
9191
}
9292

93-
function clearOutputs() {
94-
for (const url of outputUrlsRef.current) {
95-
URL.revokeObjectURL(url);
96-
}
97-
outputUrlsRef.current = [];
98-
setOutputs([]);
99-
}
100-
10193
useEffect(
10294
() => () => {
10395
runAbortRef.current?.abort();
@@ -138,7 +130,11 @@ export function App() {
138130
throw new Error("Audio and model files are required");
139131
}
140132

141-
clearOutputs();
133+
for (const url of outputUrlsRef.current) {
134+
URL.revokeObjectURL(url);
135+
}
136+
outputUrlsRef.current = [];
137+
setOutputs([]);
142138
const startedAt = Date.now();
143139
setRunProgress({
144140
phase: "preparing",

0 commit comments

Comments
 (0)