Merge pull request #634 from Entrox-Licher/main

Minor patch for Campaign Exporter
This commit is contained in:
Chr1Z 2024-03-21 15:25:13 +01:00 committed by GitHub
commit 7c5017cf1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -37,5 +37,5 @@ function onLoad()
end
function buttonClick_download(_, playerColor)
Global.call('placeholder_download', { url = self.getGMNotes(), player = Player[playerColor], replace = self.guid })
Global.call('placeholder_download', { url = self.getGMNotes(), player = playerColor and Player[playerColor] or nil, replace = self.guid })
end

View File

@ -784,7 +784,9 @@ function placeholder_download(params)
UI.setAttribute('download_progress', 'active', false)
-- hide download window
changeWindowVisibilityForColor(params.player.color, "downloadWindow", false)
if params.player then
changeWindowVisibilityForColor(params.player.color, "downloadWindow", false)
end
return 1
end