Skip to content

Commit

Permalink
Fixed bug that show undefined where contry flag is not unavailable.
Browse files Browse the repository at this point in the history
  • Loading branch information
vraj-712 committed Apr 25, 2024
1 parent 924c807 commit b4be0fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion activities/ColorMyWorld.activity/lib/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ define(["activity/ol","print","util","colormyworld","humane","flag","l10n"],
if(!target_name)target_name=target_feature.get("name");
if(colormyworld.currents.indexOf(target_name)<0){
if (!me.tooltipDisplay || target_name!=me.tooltipDisplay) {
let disply_flag = flag[`${target_name.replace(/ /g,'_')}`];
me.tooltipDisplay=target_name;
humane.timeout=1000;
humane.log(flag[`${target_name.replace(/ /g,'_')}`]+" "+ l10n.get(target_name.replace(/ /g,'_')).replace(/_/g,' '));
humane.log( (disply_flag === undefined ? "" : disply_flag) +" "+ l10n.get(target_name.replace(/ /g,'_')).replace(/_/g,' '));
setTimeout(function() {
me.tooltipDisplay=null;
}, humane.timeout);
Expand Down

0 comments on commit b4be0fb

Please sign in to comment.