From d9512b8a4a7c96adc1aafa101c1741a6e065b421 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 23 Oct 2019 14:06:58 -0300 Subject: Fix error on quit without ever opening text editor --- ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui.js b/ui.js index cfb3e87..60d9050 100644 --- a/ui.js +++ b/ui.js @@ -4023,6 +4023,10 @@ class NotesTextEditor extends TuiTextEditor { } async save() { + if (!this.openedItem || !this.openedPath) { + return + } + const text = this.getSourceText() try { await writeFile(this.openedPath, text) -- cgit 1.3.0-6-gf8a5