Skip to content

Commit 34d9c8f

Browse files
abel-nRobbieTheWagner
authored andcommitted
fix type matching (ember-learn#387)
1 parent 296f4a9 commit 34d9c8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addon/routes/docs/api/item.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default Route.extend({
1818
} else {
1919
// Create a regex that will match modules by either the path, or the
2020
// pod-path (/component, /route, etc)
21-
let type = path.match(/^(.*)s\//)[1];
21+
let type = path.match(/^([\w-]*)s\//)[1];
2222
let pathRegex = new RegExp(`${path}(/${type})?$`);
2323

2424
let modules = this.store.peekAll('module');

0 commit comments

Comments
 (0)