From 86c2ff8ff6b952208f1ba18e79899988cb0a0b55 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 2 Feb 2024 12:01:31 +0100 Subject: [PATCH] fix: empty tags and title --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index c0f06dc..23fe874 100644 --- a/main.js +++ b/main.js @@ -1319,6 +1319,10 @@ function indexheader(content) if (key == "tags") { val = val.split(",").map(t => t.trim()); + if (val.length == 1 && !val[0]) + { + val.pop(); + } } indexedheader[key] = val; } @@ -2939,7 +2943,7 @@ function bind(title, content, pos) var changed = title.value != title; backup = content; - title.value = title; + window.title.value = title; setwindowtitle(); seteditorcontent(content || "", true);