fixed comment lock

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

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;