bugfix OP with no post-message

jschan
Thomas Lynch 3 years ago
parent 6515c33f50
commit 3994e89a41
No known key found for this signature in database
GPG Key ID: 36A72F7C62CF8480
  1. 3
      gulp/res/js/filters.js

@ -263,7 +263,8 @@ const postMenuChange = function(e) {
case 'moderate':
return moderatePost(postContainer);
case 'watch':
const watcherSubject = (postDataset.subject || postContainer.querySelector('.post-message').textContent || "No subject").substring(0, 25);
const postMessage = postContainer.querySelector('.post-message');
const watcherSubject = (postDataset.subject || (postMessage && postMessage.textContent) || "No subject").substring(0, 25);
threadWatcher.add(postDataset.board, postDataset.postId, { subject: watcherSubject, unread: 0, updatedDate: new Date() });
return;
}

Loading…
Cancel
Save