fixed comment lock

This commit is contained in:
Tony Yang committed 2019-09-25 16:39:30 +08:00
1 parent 45b778484a
commit 2017b71a20
2 files changed
+9 -5

No files matched your search

+4 -2
View File
@@ -221,8 +221,10 @@ function parseComments(data) {
return false;
}
if (commentLock) {
snackbar(`每 ${commentRate} 秒只能發一則留言。`);
return false;
if (!commentContainer.dataset.editId) {
snackbar(`每 ${commentRate} 秒只能發一則留言。`);
return false;
}
} else if (!commentContainer.dataset.editId) {
// only new comment should be limited
commentLock = true;