When attempting to build my project (using Angular 9.0.5 and sweetalert2 version 7.22.2), I encountered the following message:
swal is deprecated: swal() overload for legacy alerts that use { useRejections: true }.
This warning points to a specific line of code, as well as other similar instances within the project:
private promptFormError(title: string, errorMessage: string) {
this.companyHelperService.errorPopup(title, errorMessage)
.catch(swal.noop);
}
Upon further investigation, it appears that the issue lies within the swal.noop
part of the code. I attempted to find relevant information in the documentation linked to swal via IntelliJ, but was unable to find a resolution.
If anyone could provide guidance on proper refactoring techniques or direct me to appropriate documentation, it would be greatly appreciated.
P.S: Is this warning considered to be significant? Regardless, I am eager to address and resolve it rather than ignore it.