particle-api-js 10.5.0 → 10.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "particle-api-js",
3
- "version": "10.5.0",
3
+ "version": "10.5.1",
4
4
  "description": "Particle API Client",
5
5
  "main": "src/Particle.js",
6
6
  "scripts": {
package/src/Agent.js CHANGED
@@ -255,8 +255,10 @@ class Agent {
255
255
  }
256
256
  if (query) {
257
257
  const queryParams = qs.stringify(query);
258
- const hasParams = actualUri.includes('?');
259
- actualUri = `${actualUri}${hasParams ? '&' : '?'}${queryParams}`;
258
+ if (queryParams) {
259
+ const hasParams = actualUri.includes('?');
260
+ actualUri = `${actualUri}${hasParams ? '&' : '?'}${queryParams}`;
261
+ }
260
262
  }
261
263
 
262
264
  const userAgentHeader = { 'User-Agent': `${packageJson.name}/${packageJson.version} (${packageJson.repository.url})` };