We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab3cb54 commit cbebc1aCopy full SHA for cbebc1a
app/routes/crate.js
@@ -10,6 +10,11 @@ export default class CrateRoute extends Route {
10
11
async model(params, transition) {
12
let crateName = params.crate_id;
13
+ if (crateName.trim() != crateName) {
14
+ // If the crate name has leading/trailing whitespace, redirect to the trimmed version.
15
+ this.router.transitionTo('crate', crateName.trim());
16
+ return;
17
+ }
18
19
try {
20
// We would like the peeked crate to include information (such as keywords) for further
0 commit comments