]> git.mdlowis.com Git - proto/journal.git/commitdiff
fix logic on title
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 1 Dec 2017 13:48:29 +0000 (08:48 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 1 Dec 2017 13:48:29 +0000 (08:48 -0500)
editor.js
index.html

index 9e6947f2def41c32a567917367ee4afc61b5b8b2..5625170757be06389f5f6218164eb9aeea48f419 100644 (file)
--- a/editor.js
+++ b/editor.js
@@ -63,7 +63,7 @@
        content.onkeydown = (ev) => (keys[ev.key] ? (keys[ev.key])(ev) : true);
        content.focus();
 
-       if (doc.title != "") {
+       if (doc.title === "") {
                header.innerHTML = '<h1 align="center" contenteditable="true">' + ymd_string() + '</h1><hr/>';
                doc.title = header.innerText;
        }
index 5f56cee2f09720dfbf95d620028ed6215ad1e405..53620c5279a35f75499ec37c9cd9122ced9cdaaf 100644 (file)
@@ -144,7 +144,7 @@ th:first-child, td:first-child {
        content.onkeydown = (ev) => (keys[ev.key] ? (keys[ev.key])(ev) : true);
        content.focus();
 
-       if (doc.title != "") {
+       if (doc.title === "") {
                header.innerHTML = '<h1 align="center" contenteditable="true">' + ymd_string() + '</h1><hr/>';
                doc.title = header.innerText;
        }