reset hash when changing files

[ci skip]
This commit is contained in:
Phil Hughes 2017-10-26 17:58:33 +01:00
parent 5c0c345a3a
commit 3811fbff7a
No known key found for this signature in database
GPG key ID: 32245528C52E0F9F
2 changed files with 3 additions and 2 deletions

View file

@ -15,8 +15,6 @@ export default {
},
mounted() {
this.highlightFile();
// TODO: get this to work across different files
this.lineHighlighter = new LineHighlighter({
fileHolderSelector: '.blob-viewer-container',
scrollFileHolder: true,

View file

@ -39,6 +39,9 @@ export const setFileActive = ({ commit, state, getters, dispatch }, file) => {
commit(types.SET_FILE_ACTIVE, { file, active: true });
dispatch('scrollToTab');
// reset hash for line highlighting
location.hash = '';
};
export const getFileData = ({ state, commit, dispatch }, file) => {