optional param

This commit is contained in:
Jörn-Michael Miehe 2022-09-12 22:22:40 +00:00
parent 07277602de
commit 8dac502da5
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
interface Vue { interface Vue {
$ovdashboard: { $ovdashboard: {
api_url: (endpoint: string) => string; api_url: (endpoint?: string) => string;
} }
} }
} }

View file

@ -18,7 +18,7 @@ class OVDashboardPlugin {
} }
} }
public api_url(endpoint: string | undefined): string { public api_url(endpoint?: string): string {
if (endpoint === undefined) if (endpoint === undefined)
return this.api_baseurl; return this.api_baseurl;