Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Avoid early lookup of topic controller #23

Merged
merged 1 commit into from
May 18, 2022
Merged

Conversation

davidtaylorhq
Copy link
Member

Looking up a controller during initialization causes the controller itself to be initialized, and prevents any further initializers from modifying the controller class.

We can implement exactly the same behavior using the DiscourseURL.jumpToPost method.

Looking up a controller during initialization causes the controller itself to be initialized, and prevents any further initializers from modifying the controller class.

We can implement exactly the same behavior using the `DiscourseURL.jumpToPost` method.
Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@davidtaylorhq davidtaylorhq merged commit 4a5a684 into main May 18, 2022
@davidtaylorhq davidtaylorhq deleted the topic-controller branch May 18, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants