Skip to content

Commit

Permalink
Hot patch more Grocy Javascript braindamage (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Jul 19, 2021
1 parent c9f761e commit 4f602db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grocy/rootfs/patches/fix_braindamage.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ index fceaaa0..bfc76e6 100644
@@ -87,7 +87,7 @@
Grocy.Components = { };
Grocy.Mode = '{{ GROCY_MODE }}';
Grocy.BaseUrl = '{{ $U('/') }}';
- Grocy.BaseUrl = '{{ $U('/') }}';
- Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, "");
+ Grocy.BaseUrl = window.location.origin + '{{ $U('/') }}';
+ Grocy.CurrentUrlRelative = "/" + window.location.pathname.replace(Grocy.BaseUrl, "");
Grocy.ActiveNav = '@yield('activeNav', '')';
Grocy.Culture = '{{ GROCY_LOCALE }}';
Expand Down

0 comments on commit 4f602db

Please sign in to comment.