fix: locale no puede ser undefined
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-11-16 12:06:50 +01:00
parent b2e3d61954
commit 3d352fa0fd
1 changed files with 1 additions and 4 deletions

View File

@ -37,10 +37,7 @@ export default class Controller extends Section {
const validations = window.validations;
value.forEach(log => {
let locale = {};
try {
locale = validations[log.changedModel].locale;
} catch (e) {}
const locale = validations[log.changedModel].locale ? validations[log.changedModel].locale : {};
log.oldProperties = this.getInstance(log.oldInstance, locale);
log.newProperties = this.getInstance(log.newInstance, locale);