Make sure that Grocy.CurrentUrlRelative is set without the query string (fixes #509)

This commit is contained in:
Bernd Bestel
2020-01-23 20:12:38 +01:00
parent d7c7e0f53c
commit 594dc0858b
2 changed files with 2 additions and 1 deletions

View File

@@ -50,7 +50,7 @@
Grocy.Components = { };
Grocy.Mode = '{{ GROCY_MODE }}';
Grocy.BaseUrl = '{{ $U('/') }}';
Grocy.CurrentUrlRelative = "/" + window.location.toString().replace(Grocy.BaseUrl, "");
Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, "");
Grocy.ActiveNav = '@yield('activeNav', '')';
Grocy.Culture = '{{ GROCY_CULTURE }}';
Grocy.Currency = '{{ GROCY_CURRENCY }}';