From b3aee62ffe26ff68e7e405c9693caa31f703ed3a Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 10 Jun 2015 19:39:37 +1000 Subject: [PATCH] correct op suppression logic --- .../discourse/initializers/extend-for-solved-button.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 index 5e67833..01e7a81 100644 --- a/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 +++ b/assets/javascripts/discourse/initializers/extend-for-solved-button.js.es6 @@ -49,9 +49,9 @@ export default { var canAccept = this.get('post.can_accept_answer'); var canUnaccept = this.get('post.can_unaccept_answer'); var accepted = this.get('post.accepted_answer'); - var isOp = Discourse.User.currentProp("id") !== this.get('post.topic.user_id'); + var isOp = Discourse.User.currentProp("id") === this.get('post.topic.user_id'); - if (canAccept && !isOp) { + if (!accepted && canAccept && !isOp) { // first hidden position if (this.get('collapsed')) { return; } position = visibleButtons.length - 2;