[+] 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
@Prop() courses: Course[];
// Instance
public static instance: Navigation;
/**
* This is called when the instance is created.
*/
public created()
{
// Set instance
Navigation.instance = this;
// Set history state
let url = window.location.pathname;
if (url == '/' || url == '') url = '/overall';