mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 16:02:19 +00:00
template editor nit
This commit is contained in:
@@ -399,7 +399,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
let valueAfterDispose: string | undefined = undefined
|
||||
export function getCode(): string {
|
||||
if (valueAfterDispose != undefined) {
|
||||
return valueAfterDispose
|
||||
}
|
||||
return editor?.getValue() ?? ''
|
||||
}
|
||||
|
||||
@@ -622,6 +626,7 @@
|
||||
|
||||
onDestroy(() => {
|
||||
try {
|
||||
valueAfterDispose = getCode()
|
||||
jsLoader && clearTimeout(jsLoader)
|
||||
model && model.dispose()
|
||||
editor && editor.dispose()
|
||||
|
||||
Reference in New Issue
Block a user