From f4b775e509cbb24cef0bc790fcadae783165a0d0 Mon Sep 17 00:00:00 2001 From: vgaNAR6ta Date: Sat, 28 Feb 2026 17:44:27 +0100 Subject: [PATCH] =?UTF-8?q?edit:=20valeur=20min=20=C3=A0=201=20pour=20?= =?UTF-8?q?=C3=A9viter=20array=20vide=20dans=20g=C3=A9n=C3=A9ration=20du?= =?UTF-8?q?=20contenu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MainContent.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MainContent.vue b/src/MainContent.vue index e5e2c37..1760a22 100644 --- a/src/MainContent.vue +++ b/src/MainContent.vue @@ -187,9 +187,9 @@ name : 'MainContent', methods:{ divideItem(){ - const half = Math.floor(this.maxItemCount/2); - this.partOne = this.getRandomInt(0,half); - this.partTwo = this.getRandomInt(0,half); + const half = Math.floor(this.maxItemCount/2)+1; + this.partOne = this.getRandomInt(1,half); + this.partTwo = this.getRandomInt(1,half); this.partThree = this.maxItemCount-this.partTwo-this.partOne; console.log(this.partOne,this.partTwo,this.partThree); },