aotrautils-srv 0.0.210 → 0.0.211

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1.0.0.000 (19/07/2022-03:27:06)»*/
3
+ /*utils COMMONS library associated with aotra version : «1.0.0.000 (19/07/2022-03:36:03)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4828
4828
 
4829
4829
 
4830
4830
 
4831
- /*utils SERVER library associated with aotra version : «1.0.0.000 (19/07/2022-03:27:06)»*/
4831
+ /*utils SERVER library associated with aotra version : «1.0.0.000 (19/07/2022-03:36:03)»*/
4832
4832
  /*-----------------------------------------------------------------------------*/
4833
4833
 
4834
4834
 
@@ -6163,12 +6163,16 @@ class ListManager{
6163
6163
  lognow("ERROR : Cannot add null item.");
6164
6164
  return;
6165
6165
  }
6166
- const numberOfItemsCurrently=countKeys(this.itemsInfos);
6166
+ const numberOfItemsCurrently=getArraySize(this.itemsInfos);
6167
6167
  if(this.maxItemsNumber<=numberOfItemsCurrently){
6168
6168
  // TRACE
6169
6169
  lognow("ERROR : Cannot add item with id «"+id+"», list already full.");
6170
6170
  return;
6171
6171
  }
6172
+
6173
+ // DBG
6174
+ lognow(">>>>>>>>>numberOfItemsCurrently:",numberOfItemsCurrently);
6175
+
6172
6176
  if(numberOfItemsCurrently==0 && this.mode==="startAtConnexion"){
6173
6177
  this.startSession();
6174
6178
  }
@@ -6227,10 +6231,14 @@ class ListManager{
6227
6231
 
6228
6232
  let id=null;
6229
6233
  foreach(this.itemsInfos,(itemInfos,key)=>{
6230
- if(itemInfos.item===item){
6234
+ if(itemInfos.item===item
6235
+ // DEBUG ONLY :
6236
+ || (itemInfos.item.id && item.id && itemInfos.item.id===item.id)
6237
+ ){
6231
6238
  id=key;
6232
6239
  return "break";
6233
6240
  }
6241
+
6234
6242
  });
6235
6243
 
6236
6244
  if(!id){
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.210",
3
+ "version": "0.0.211",
4
4
  "main": "aotrautils-srv.build.js",
5
5
  "description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",