Skip to content

Commit

Permalink
CLDR-16844 Fix bug in last PR: require parameter for cldrInfo.closePa…
Browse files Browse the repository at this point in the history
…nel (#3872)
  • Loading branch information
btangmu authored Jul 17, 2024
1 parent 49c74ad commit 7b03b2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tools/cldr-apps/js/src/esm/cldrInfo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ function openPanel() {
* false if closing because switching to a "special" view where the Info Panel doesn't belong
*/
function closePanel(userWantsHidden) {
if (userWantsHidden === undefined) {
console.error("cldrInfo.closePanel was called with undefined parameter");
}
if (panelVisible) {
panelVisible = false;
panelWanted = !userWantsHidden;
Expand Down
2 changes: 1 addition & 1 deletion tools/cldr-apps/js/src/esm/cldrLoad.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ function specialLoad(itemLoadInfo, curSpecial, theDiv) {
if (curSpecial !== "general") {
cldrGui.hideDashboard();
}
cldrInfo.closePanel();
cldrInfo.closePanel(false /* userWantsHidden */);
// Most special.load() functions do not use a parameter; an exception is
// cldrGenericVue.load() which expects the special name as a parameter
if (CLDR_LOAD_DEBUG) {
Expand Down
2 changes: 1 addition & 1 deletion tools/cldr-apps/js/src/views/InfoPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
},
methods: {
closeInfoPanel() {
cldrInfo.closePanel();
cldrInfo.closePanel(true /* userWantsHidden */);
},
reloadInfoPanel() {
Expand Down

0 comments on commit 7b03b2d

Please sign in to comment.