[FIX] Meteor errors not translating for toast messages (#19993)

pull/20089/head^2
gabriellsh 4 years ago committed by GitHub
parent a1d67fa759
commit 79f51f6b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/utils/client/lib/handleError.js

@ -23,7 +23,7 @@ export const handleError = function(error, useToastr = true) {
}
const details = Object.entries(error.details || {})
.reduce((obj, [key, value]) => ({ ...obj, [key]: escapeHTML(value) }), {});
const message = TAPi18n.__(error.message || error.error, details);
const message = TAPi18n.__(error.error || error.message, details);
const title = details.errorTitle && TAPi18n.__(details.errorTitle);
return toastr.error(message, title);

Loading…
Cancel
Save