[+] Add instance to navigation

This commit is contained in:
Hykilpikonna
2019-10-20 21:38:11 -04:00
parent 9bb34fb2a4
commit 90f888bc4b
+6
View File
@@ -17,11 +17,17 @@ export default class Navigation extends Vue
// @ts-ignore // @ts-ignore
@Prop() courses: Course[]; @Prop() courses: Course[];
// Instance
public static instance: Navigation;
/** /**
* This is called when the instance is created. * This is called when the instance is created.
*/ */
public created() public created()
{ {
// Set instance
Navigation.instance = this;
// Set history state // Set history state
let url = window.location.pathname; let url = window.location.pathname;
if (url == '/' || url == '') url = '/overall'; if (url == '/' || url == '') url = '/overall';