tuain-ng-forms-lib 15.1.0 → 15.1.2

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.
@@ -2730,7 +2730,7 @@ class LibEventManagerService {
2730
2730
  const { name, type, initialValue, windowTime, timestampProvider } = eventObject;
2731
2731
  const currentSubject = this.eventSubjects[name];
2732
2732
  if (rebuild || !currentSubject) {
2733
- if (type === 'beahavior') {
2733
+ if (type === 'behaviour') {
2734
2734
  const newEventSubject = new BehaviorSubject(initialValue);
2735
2735
  this.eventSubjects[name] = newEventSubject;
2736
2736
  }
@@ -2752,7 +2752,13 @@ class LibEventManagerService {
2752
2752
  getEventNames() { return Object.keys(this.eventSubjects); }
2753
2753
  getSubject(eventClassName) { return eventClassName ? this.eventSubjects[eventClassName] : null; }
2754
2754
  subscribe(eventClassName, callback) { return this.getSubject(eventClassName).subscribe(callback); }
2755
- next(eventClassName, data) { this.getSubject(eventClassName).next(data); }
2755
+ next(eventClassName, data) {
2756
+ const subject = this.getSubject(eventClassName);
2757
+ if (!subject) {
2758
+ console.log(`No se encontró subject ${eventClassName}`);
2759
+ }
2760
+ subject.next(data);
2761
+ }
2756
2762
  }
2757
2763
 
2758
2764
  class LibFileManagementService {
@@ -3030,7 +3036,7 @@ class BasicFormComponent extends FormStructureAndData {
3030
3036
  return stateChanged;
3031
3037
  }
3032
3038
  checkErrorRecordReceived(recordResponse) {
3033
- const { error } = recordResponse;
3039
+ const { error } = recordResponse ?? {};
3034
3040
  if (!error) {
3035
3041
  return false;
3036
3042
  }