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

Cleanup legacy code #1519

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Cleanup legacy code #1519

wants to merge 2 commits into from

Conversation

chancancode
Copy link
Member

Remove the branching needed for less than supported versions (<4) of Ember. Turns out that is everything at this point.

I did not very carefully examine what each branch is doing, but just mechanically evaluated each conditional and deleted the logically dead branch.

This was deprecated and removed in 4.0, which is now the minimum
supported version.
@chancancode chancancode force-pushed the cleanup-legacy-rebased branch 2 times, most recently from 474e4d1 to 33657d7 Compare November 22, 2024 02:30
Turns out that accounts for _all_ of the current usage.
@chancancode chancancode force-pushed the cleanup-legacy-rebased branch from 33657d7 to fd10660 Compare November 22, 2024 02:31
router = mainRouter as Router;
ROUTER.set(context, router);
}

Copy link
Member Author

Choose a reason for hiding this comment

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

this..

// sub-classed. The most we can do at present is assert that it at least
// *exists* and assume that if it does exist, it is bound correctly.
const router = owner.lookup('service:router') as RouterService;
assert('router service is not set up correctly', !!router);
Copy link
Member Author

Choose a reason for hiding this comment

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

..and this hunk, should be the only non-trivial modification (even then this is still pretty trivial, just following the lead of the linter and consolidated some variables)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant