@arsedizioni/ars-utils 21.2.307 → 21.2.310

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.
@@ -2159,11 +2159,9 @@ class ClipperSearchResultItemComponent {
2159
2159
  else if (message.id === ClipperMessages.COMMAND_NOTES_UPDATE) {
2160
2160
  const p = this.item().notes?.findIndex(p => p.id === message.data.id);
2161
2161
  if (p !== undefined && p >= 0) {
2162
- this.item.update(v => {
2163
- const props = [...(v.notes ?? [])];
2164
- props[p] = message.data;
2165
- return { ...v, notes: props };
2166
- });
2162
+ const props = [...(this.item().notes ?? [])];
2163
+ props[p] = message.data;
2164
+ this.item.update(v => ({ ...v, notes: props }));
2167
2165
  }
2168
2166
  }
2169
2167
  });
@@ -4380,7 +4378,7 @@ class ClipperNoteEditComponent {
4380
4378
  this.availableTeams = signal([], ...(ngDevMode ? [{ debugName: "availableTeams" }] : /* istanbul ignore next */ []));
4381
4379
  this.selectedTeam = { name: 'Nessuno, usa note personali', value: SystemUtils.emptyUUID() };
4382
4380
  this.item = this.dialogData.currentItem?.id
4383
- ? this.dialogData.currentItem
4381
+ ? SystemUtils.clone(this.dialogData.currentItem)
4384
4382
  : { color: this.colors[0].value };
4385
4383
  if (this.dialogData.currentItem?.documentId) {
4386
4384
  this.item.documentId = this.dialogData.currentItem.documentId;