From 173e0c61b642b31c299475a807aa5fbc8c4c94cd Mon Sep 17 00:00:00 2001 From: tofulm Date: Fri, 15 May 2020 10:50:47 +0200 Subject: [PATCH] =?UTF-8?q?un=20petit=20test=20pour=20plus=20de=20s=C3=A9c?= =?UTF-8?q?u?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 bf2e443..9c09d08 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -214,7 +214,7 @@ let monTableau = { this.header = config.header; this.crayons = config.crayons; this.table = data; - if (data[0].search) { + if (data.length && data[0].search) { this.champ_search = 'search'; } console.log('fin chargement localStorage'); diff --git a/js/gamutable.js b/js/gamutable.js index 98c1e34..b68b715 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -241,7 +241,7 @@ var monTableau = { this.crayons = config.crayons; this.table = data; - if (data[0].search) { + if (data.length && data[0].search) { this.champ_search = 'search'; }