From c47b64214e9d27390618cad81a9d06cbb8432b25 Mon Sep 17 00:00:00 2001 From: tofulm Date: Sun, 17 May 2020 21:12:03 +0200 Subject: [PATCH] on evite un erreur js, si le json est vide --- js/gamutable.es6.js | 2 +- js/gamutable.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index a7c6c2c..0d06319 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -229,7 +229,7 @@ let monTableau = { Vue.set(this.table, i, data[0]); } else { this.table = data; - if (data[0].search) { + if (data[0] && data[0].search) { this.champ_search = 'search'; } } diff --git a/js/gamutable.js b/js/gamutable.js index 62b4a53..aacdc00 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -264,7 +264,7 @@ var monTableau = { } else { _this2.table = data; - if (data[0].search) { + if (data[0] && data[0].search) { _this2.champ_search = 'search'; } }