Merge pull request #2071 from brkcvn/console-errors

Console errors
This commit is contained in:
Cüneyt Şentürk 2021-05-31 22:11:44 +03:00 committed by GitHub
commit d99e42520d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View File

@ -64,6 +64,7 @@ import AkauntingRecurring from './AkauntingRecurring';
import Form from './../plugins/form'; import Form from './../plugins/form';
import { Alert, ColorPicker } from 'element-ui'; import { Alert, ColorPicker } from 'element-ui';
import Global from './../mixins/global';
export default { export default {
name: 'akaunting-modal-add-new', name: 'akaunting-modal-add-new',
@ -150,7 +151,7 @@ export default {
this.component = Vue.component('add-new-component', (resolve, reject) => { this.component = Vue.component('add-new-component', (resolve, reject) => {
resolve({ resolve({
template : '<div id="modal-add-new-form-' + form_prefix + '">' + this.message + '</div>', template : '<div id="modal-add-new-form-' + form_prefix + '">' + this.message + '</div>',
mixins: [Global],
components: { components: {
AkauntingRadioGroup, AkauntingRadioGroup,
AkauntingSelect, AkauntingSelect,

View File

@ -318,11 +318,16 @@ export default {
this.selected = this.value; this.selected = this.value;
if (this.model.length) { if (this.model.length) {
if (eval(this.model) !== undefined) { try {
this.selected = eval(this.model); if (eval(this.model) !== undefined) {
} else { this.selected = eval(this.model);
} else {
this.selected = this.model;
}
} catch (e) {
this.selected = this.model; this.selected = this.model;
} }
} }
if (this.multiple && !this.selected.length) { if (this.multiple && !this.selected.length) {

View File

@ -430,11 +430,16 @@ export default {
this.selected = this.value; this.selected = this.value;
if (this.model.length) { if (this.model.length) {
if (eval(this.model) !== undefined) { try {
this.selected = eval(this.model); if (eval(this.model) !== undefined) {
} else { this.selected = eval(this.model);
} else {
this.selected = this.model;
}
} catch (e) {
this.selected = this.model; this.selected = this.model;
} }
} }
if (this.multiple && !this.selected.length) { if (this.multiple && !this.selected.length) {