From c8d5de14a845fa46544a7c66a2a473133ad42a10 Mon Sep 17 00:00:00 2001 From: wwwung Date: Sat, 5 Dec 2020 14:55:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=A4=84=E7=90=86=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=E4=BD=8D=E6=95=B0=E4=B8=BA0=E6=97=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=A0=88=E6=BA=A2=E5=87=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mock/parser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mock/parser.js b/src/mock/parser.js index 7216d706..d97aeb74 100644 --- a/src/mock/parser.js +++ b/src/mock/parser.js @@ -43,7 +43,8 @@ module.exports = { var dmin = decimal && decimal[1] && parseInt(decimal[1], 10) // || 0, var dmax = decimal && decimal[2] && parseInt(decimal[2], 10) // || 0, // int || dmin-dmax || 0 - var dcount = decimal ? !decimal[2] && parseInt(decimal[1], 10) || Random.integer(dmin, dmax) : undefined + // var dcount = decimal ? !decimal[2] && parseInt(decimal[1], 10) || Random.integer(dmin, dmax) : undefined + var dcount = decimal ? !decimal[2] && decimal[1] ? parseInt(decimal[1], 10) : Random.integer(dmin, dmax) : undefined var result = { // 1 name, 2 inc, 3 range, 4 decimal