summaryrefslogtreecommitdiff
path: root/lib/models
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-07-28 15:03:06 +0200
committerGitHub2018-07-28 15:03:06 +0200
commit93a3ce1164f69af24381c94b941048580891e1b8 (patch)
treeae64f96852301211c38ff789f856c9af299dd825 /lib/models
parenta6a15e09fe2b3074daa200fe7768e39c20623b9b (diff)
parentdb5b86df4c735a4ed80e1ae683dc58e15f819e0b (diff)
Merge pull request #907 from SISheogorath/fix/historyLZString
Some minor improvements for LZString handling
Diffstat (limited to '')
-rw-r--r--lib/models/note.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/models/note.js b/lib/models/note.js
index ec7e2b13..0e8dd4dd 100644
--- a/lib/models/note.js
+++ b/lib/models/note.js
@@ -227,7 +227,11 @@ module.exports = function (sequelize, DataTypes) {
var id = LZString.decompressFromBase64(noteId)
if (id && Note.checkNoteIdValid(id)) { return callback(null, id) } else { return _callback(null, null) }
} catch (err) {
- logger.error(err)
+ if (err.message === 'Cannot read property \'charAt\' of undefined') {
+ logger.warning('Looks like we can not decode "' + noteId + '" with LZString. Can be ignored.')
+ } else {
+ logger.error(err)
+ }
return _callback(null, null)
}
},