refactor(tui): centralize application exit (#31524)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { CliRenderer } from "@opentui/core"
|
||||
|
||||
export function destroyRenderer(renderer: Pick<CliRenderer, "isDestroyed" | "setTerminalTitle" | "destroy">) {
|
||||
renderer.setTerminalTitle("")
|
||||
if (!renderer.isDestroyed) renderer.destroy()
|
||||
if (!renderer.isDestroyed) {
|
||||
renderer.setTerminalTitle("")
|
||||
renderer.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user