Skip to content

Commit

Permalink
Corrected bug where a country without a flag was selected and not rep…
Browse files Browse the repository at this point in the history
…laced by a valid one
  • Loading branch information
ChristianFN2 committed Mar 10, 2024
1 parent 716c230 commit b4f467b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion questionservice/question-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class WIQ_API{
const imgs = []
for(var i=0;i<numOfChosen;i++){
//Making sure there is an image associated
while(!'imagen_de_la_bandera' in data.results.bindings[chosenNums[i]]){
while(!Object.keys(data.results.bindings[chosenNums[i]]).includes('imagen_de_la_bandera')){
chosenNums[i] = this.#getRandomNumNotInSetAndUpdate(countriesNum, chosenNums)
}
imgs.push(data.results.bindings[chosenNums[i]].imagen_de_la_bandera.value)
Expand Down

0 comments on commit b4f467b

Please sign in to comment.