mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
fix tab index counter. In case of a server restart the global var does not exist anymore causing an error
This commit is contained in:
parent
63f389158b
commit
c5c4c65f3c
1 changed files with 3 additions and 0 deletions
|
|
@ -417,6 +417,9 @@ module TodosHelper
|
|||
end
|
||||
|
||||
def next_tab_index
|
||||
# make sure it exists if reset was not called. Set to 20 to avoid clashes with existing form in sidebar
|
||||
$tracks_tab_index ||= 20
|
||||
|
||||
$tracks_tab_index = $tracks_tab_index + 1
|
||||
return $tracks_tab_index
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue