Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Luc Bourdot
codimd
Commits
510b1254
Commit
510b1254
authored
Oct 11, 2016
by
Wu Cheng-Han
Browse files
Fix new note with empty content not saving to history and remove debug code
parent
bc74c1f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/history.js
View file @
510b1254
...
...
@@ -113,8 +113,7 @@ function setHistory(userid, history) {
}
function
updateHistory
(
userid
,
noteId
,
document
)
{
var
t0
=
new
Date
().
getTime
();
if
(
userid
&&
noteId
&&
document
)
{
if
(
userid
&&
noteId
&&
typeof
document
!==
'
undefined
'
)
{
getHistory
(
userid
,
function
(
err
,
history
)
{
if
(
err
||
!
history
)
return
;
if
(
!
caches
[
userid
].
history
[
noteId
])
{
...
...
@@ -127,8 +126,6 @@ function updateHistory(userid, noteId, document) {
noteHistory
.
time
=
moment
().
format
(
'
MMMM Do YYYY, h:mm:ss a
'
);
noteHistory
.
tags
=
noteInfo
.
tags
;
caches
[
userid
].
isDirty
=
true
;
var
t1
=
new
Date
().
getTime
();
console
.
warn
(
t1
-
t0
);
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment