Skip to content

Commit

Permalink
Merge pull request #33 from randombenj/bugfix/documentation-link
Browse files Browse the repository at this point in the history
fix(web): link to documentation
  • Loading branch information
fliiiix authored Jan 12, 2020
2 parents a446614 + a3a907e commit 87cc489
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions web/src/pages/Docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ export default {
this.versions = (await ProjectRepository.getVersions(
this.$route.params.project
)).map((version) => version.name)
this.docURL = this.$route.params.location || ProjectRepository.getProjectDocsURL(
this.$route.params.project,
this.$route.params.version
)
// listen on anchor tag changes
const component = this
document.getElementById("docs")
.contentWindow.addEventListener("hashchange", (event) =>
component.load(event.newURL))
},
methods: {
onChange() {
Expand All @@ -68,11 +69,6 @@ export default {
location
}
})
// load the correct documentation
this.docURL = ProjectRepository.getProjectDocsURL(
this.$route.params.project,
this.$route.params.version
)
}
}
}
Expand Down

0 comments on commit 87cc489

Please sign in to comment.