From e66c51fd85d2564da0b9711e12fdfb522c83c3c9 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 12 Jun 2016 16:36:38 +1000 Subject: [PATCH] correct regression where clicking on unlisted topics does not work --- app/controllers/topics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 1b58942aba4..3ffc9a86a56 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -77,7 +77,7 @@ class TopicsController < ApplicationController discourse_expires_in 1.minute - if !@topic_view.topic.visible && @topic_view.topic.slug != params[:slug] + if !@topic_view.topic.visible && @topic_view.topic.slug != params[:slug] && !request.format.json? raise Discourse::NotFound end