fix: notification ssr

This commit is contained in:
vchikalkin 2023-06-26 12:33:00 +03:00
parent 79171fe109
commit d0ad5c9965

View File

@ -27,7 +27,7 @@ export default class Validation {
public removeError = ({ key }: Pick<ValidationError, 'key'>) => {
const error = [...this.errors].find((x) => x.key === key);
if (error) this.errors.delete(error);
if (this.errors.size === 0) notification.destroy(this.params.err_key);
if (this.errors.size === 0 && !isServer()) notification.destroy(this.params.err_key);
};
public setError = ({ key, message, silent }: ValidationParams) => {