@adins/ucsearch 2.9.9 → 2.9.10

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.
@@ -797,9 +797,11 @@ class UCSearchComponent {
797
797
  //cek yg pakai restriction gte/lte/gt/lt
798
798
  let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GT")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "GTE"));
799
799
  let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LTE")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LT")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == "LTE"));
800
- if (this.myForm.nativeElement[MinComponent.id].value > this.myForm.nativeElement[MaxComponent.id].value) {
801
- this.toastr.warning(MinComponent.label + " must be less than " + MaxComponent.label);
802
- return false;
800
+ if (MinComponent && MaxComponent) {
801
+ if (this.myForm.nativeElement[MinComponent.id].value > this.myForm.nativeElement[MaxComponent.id].value) {
802
+ this.toastr.warning(MinComponent.label + " must be less than " + MaxComponent.label);
803
+ return false;
804
+ }
803
805
  }
804
806
  return true;
805
807
  }