From af5b4b2cf3c0f98788517deed999c37f7741dd89 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 14 Mar 2017 17:58:11 +0100 Subject: [PATCH] avoid error unload --- js/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/app.js b/js/app.js index 1c00311..105bf92 100644 --- a/js/app.js +++ b/js/app.js @@ -256,9 +256,11 @@ function loadTxt() { } function saveTxt() { - var txt = textArea.elem.val(); - //console.log('saveTxt', videoHash, txt.length); - globalUser.set_txt(videoHash, txt); + if (textArea) { + var txt = textArea.elem.val(); + //console.log('saveTxt', videoHash, txt.length); + globalUser.set_txt(videoHash, txt); + } } function saveContent(content, type, path) {