Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Commit

Permalink
remove destructuring from generateRequestUrl signature (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicknisi authored Nov 7, 2017
1 parent a29a00b commit 886d7c3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/request/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import { forOf } from '@dojo/shim/iterator';
* @param url The base URL.
* @param options The RequestOptions used to generate the query string or cacheBust.
*/
export function generateRequestUrl(url: string,
{ query, cacheBust }: RequestOptions = {}): string {
query = new UrlSearchParams(query).toString();
if (cacheBust) {
export function generateRequestUrl(url: string, options: RequestOptions = {}): string {
let query = new UrlSearchParams(options.query).toString();
if (options.cacheBust) {
const bustString = String(Date.now());
query += query ? `&${bustString}` : bustString;
}
Expand Down

0 comments on commit 886d7c3

Please sign in to comment.