aewr
This commit is contained in:
@@ -107,7 +107,7 @@ export function initEditor() {
|
||||
}
|
||||
|
||||
async function loadVersionsForCurrent() {
|
||||
if (!current?.id || !current?.section?.is_template) {
|
||||
if (!current?.id) {
|
||||
renderVersionOptions([]);
|
||||
return;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ export function initEditor() {
|
||||
window.__currentEditorCtx = { id: current.id, mode: current.section.slug, section: current.section };
|
||||
setSendContext(current.section?.is_template ? current.id : 0, current.name);
|
||||
if (btnTest) btnTest.classList.toggle('hidden', !current.section?.is_template);
|
||||
setVersionUiVisible(!!current.section?.is_template);
|
||||
setVersionUiVisible(!!current.section);
|
||||
|
||||
// Neuen Token erzeugen & alten Listener entfernen
|
||||
reqToken++;
|
||||
@@ -657,7 +657,7 @@ export function initEditor() {
|
||||
sendForm && (sendForm.onsubmit = doSend);
|
||||
editorSelect && (editorSelect.onchange = () => switchEditor(editorSelect.value));
|
||||
btnRestoreVersion && (btnRestoreVersion.onclick = async () => {
|
||||
if (!current?.id || !current?.section?.is_template) return;
|
||||
if (!current?.id) return;
|
||||
const versionId = Number(versionSelect?.value || 0);
|
||||
if (!versionId) {
|
||||
err('Bitte eine Version auswählen');
|
||||
|
||||
Reference in New Issue
Block a user