refactor: fix lint on public/js/history.js

Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
BoHong Li 2019-08-02 01:03:05 +08:00
parent 8ca8484992
commit 8394ff58e9
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
1 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ export function writeHistory (title, tags) {
}
function writeHistoryToStorage (title, tags) {
let data = store.get('notehistory')
const data = store.get('notehistory')
let notehistory
if (data && typeof data === 'string') {
notehistory = JSON.parse(data)
@ -260,7 +260,7 @@ function parseToHistory (list, notehistory, callback) {
for (let i = 0; i < notehistory.length; i++) {
// migrate LZString encoded id to base64url encoded id
try {
let id = LZString.decompressFromBase64(notehistory[i].id)
const id = LZString.decompressFromBase64(notehistory[i].id)
if (id && checkNoteIdValid(id)) {
notehistory[i].id = encodeNoteId(id)
}