@osimatic/helpers-js 1.0.59 → 1.0.60

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.
Files changed (2) hide show
  1. package/network.js +6 -1
  2. package/package.json +1 -1
package/network.js CHANGED
@@ -620,13 +620,18 @@ class UrlAndQueryString {
620
620
  if (typeof (object) == 'object') {
621
621
  for (var name in object) {
622
622
  value = object[name];
623
+ // 06/06/2022 : ajout de ce if pour éviter bug sur fonction HTTPRequest.formatQueryString
624
+ if (typeof (value) == 'undefined') {
625
+ continue;
626
+ }
623
627
  // 14/01/2020 : les tableaux avec param[0], param[1] en query string fonctionne pas, il faut mettre param[]=x&param[]=y
624
628
  //name = p == '' ? name : '['+name+']';
625
629
  name = p == '' ? name : '[]';
626
630
  if (typeof (value) == 'object') {
627
631
  buildStringFromParam(value, p + name);
628
632
  }
629
- else if (typeof (value) != 'function' && name != '') {
633
+ // 06/06/2022 : ajout null !== value pour éviter bug sur fonction HTTPRequest.formatQueryString
634
+ else if (null !== value && typeof (value) != 'function' && name != '') {
630
635
  // 27/01/2020 : correction bug boolean affiché en string true/false
631
636
  if (typeof (value) == 'boolean') {
632
637
  value = (value ? 1 : 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"