Skip to content

Commit

Permalink
fix for open collection when switching versions (or open collection i…
Browse files Browse the repository at this point in the history
…s otherwise now invalid)
  • Loading branch information
jtsage committed Nov 14, 2024
1 parent 49a26d5 commit d2aeee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fsg-mod-assistant",
"version": "5.1.3",
"version": "5.1.4",
"description": "FSG Farm Sim Mod Assistant",
"main": "modAssist_main.js",
"homepage": "https://github.com/FSGModding/FSG_Mod_Assistant#readme",
Expand Down
6 changes: 5 additions & 1 deletion renderer/renderJS/main_ui_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,11 @@ class StateManager {
}

if ( this.track.openCollection !== null ) {
this.collections[this.track.openCollection].modNode.classList.add('d-none')
if ( typeof this.collections[this.track.openCollection] === 'undefined' ) {
this.track.openCollection = null
} else {
this.collections[this.track.openCollection].modNode.classList.add('d-none')
}
}

if ( this.track.openCollection === id && !stayOpen ) {
Expand Down

0 comments on commit d2aeee9

Please sign in to comment.