From c3d06ca5dbec264bac18adbaa6af1534aa9adbf9 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 28 Nov 2022 14:47:23 +0100 Subject: [PATCH 1/2] fix: crashea cuando el log no tiene changedModel --- front/salix/components/log/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index 2796931a0..fda465ae4 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -34,10 +34,11 @@ export default class Controller extends Section { set logs(value) { this._logs = value; if (!value) return; - + console.log(value); const validations = window.validations; value.forEach(log => { - const locale = validations[log.changedModel].locale ? validations[log.changedModel].locale : {}; + console.log(log.changedModel); + const locale = validations[log.changedModel] && validations[log.changedModel].locale ? validations[log.changedModel].locale : {}; log.oldProperties = this.getInstance(log.oldInstance, locale); log.newProperties = this.getInstance(log.newInstance, locale); From a0f5cf14499cca2c81510ddd7cc033160d3e5f4c Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 28 Nov 2022 14:48:37 +0100 Subject: [PATCH 2/2] refactor: borrados saltos de linea --- front/salix/components/log/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index fda465ae4..f30878b9f 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -34,10 +34,9 @@ export default class Controller extends Section { set logs(value) { this._logs = value; if (!value) return; - console.log(value); + const validations = window.validations; value.forEach(log => { - console.log(log.changedModel); const locale = validations[log.changedModel] && validations[log.changedModel].locale ? validations[log.changedModel].locale : {}; log.oldProperties = this.getInstance(log.oldInstance, locale);