Skip to content

Commit

Permalink
Fix query with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Răzvan C. Rădulescu committed May 26, 2021
1 parent af7f02b commit e060279
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project/PexelsQD/Session.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func search(query: String) -> Dictionary:

var params := {
"base_url": PHOTO.base_url,
"query": query,
"query": query.http_escape(),
"page": 1 if is_first else _rng.randi_range(1, _total_results)
}

Expand All @@ -72,7 +72,7 @@ func search(query: String) -> Dictionary:

if is_first:
_total_results = body.result.total_results
return search(params.query)
return search(query)
elif _total_results > 0:
for photo in body.result.photos:
var src: String = photo.src.large2x
Expand Down

0 comments on commit e060279

Please sign in to comment.