main ← small-lovely-cat:fix-post-voting-nested
opened 08:10AM - 20 May 26 UTC
When posting a post-voting topic using `discourse-post-voting` plugin, and openi…ng it in nested view, the page render failed.
In devcontainer, the page throw an unrecoverable render error.
And in production, the server returned 500 error.
This issue stems from the `shouldRender` reading `topicPageQueryParams` unguarded, in nested view, the connector failed. This commit solved this by adding a guard to that.
Also add some specs to avoid regression.
Before:
<img width="1917" height="912" alt="image" src="https://github.com/user-attachments/assets/1ebb901f-a3c6-43a5-8a72-76cb7bae13be" />
After:
<img width="1917" height="926" alt="image" src="https://github.com/user-attachments/assets/a35ef924-5481-475b-8ca1-88557fe437b6" />
Also solved an issue preventing the textarea triggered by clicking `Add a comment` button from focusing in nested view.