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

Register shouldn't read data #256

Merged
merged 6 commits into from Nov 25, 2019
Merged

Conversation

cherifGsoul
Copy link
Member

This adds the ability to set .data even after .register was called:

  • Move the code that read .data from register.js to canRoute.start
  • Write the needed test

Closes #255

mockRoute.stop();
};

canRoute.register("{page}/{subpage}");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused by this test. Should calling route.register after calling route.start be supported?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, if you run this test by itself it fails.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated!

@cherifGsoul cherifGsoul merged commit f3f2a40 into master Nov 25, 2019
@cherifGsoul cherifGsoul deleted the register-shouldnt-read-data branch November 25, 2019 18:50
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.

route.register should not read route.data
2 participants