accepter de ne pas avoir dans le header de cle 'crayons'

This commit is contained in:
Christophe 2020-06-18 14:47:40 +02:00
parent 10be3c510f
commit 01ba735d07
2 changed files with 14 additions and 4 deletions

View file

@ -220,7 +220,9 @@ let monTableau = {
if (data && data.length) {
let config = data.shift();
this.header = config.header;
this.crayons = config.crayons;
if (config.crayons !== undefined) {
this.crayons = config.crayons;
}
if (config.classes !== undefined) {
this.classes = config.classes;
}
@ -236,7 +238,9 @@ let monTableau = {
.then((data) => {
let config = data.shift();
this.header = config.header;
this.crayons = config.crayons;
if (config.crayons !== undefined) {
this.crayons = config.crayons;
}
if (config.classes !== undefined) {
this.classes = config.classes;
}

View file

@ -258,7 +258,10 @@ var monTableau = {
if (data && data.length) {
var config = data.shift();
this.header = config.header;
this.crayons = config.crayons;
if (config.crayons !== undefined) {
this.crayons = config.crayons;
}
if (config.classes !== undefined) {
this.classes = config.classes;
@ -279,7 +282,10 @@ var monTableau = {
}).then(function (data) {
var config = data.shift();
_this2.header = config.header;
_this2.crayons = config.crayons;
if (config.crayons !== undefined) {
_this2.crayons = config.crayons;
}
if (config.classes !== undefined) {
_this2.classes = config.classes;