From 9f50ce97b40bc1e37f51b2086c7314d87619ee45 Mon Sep 17 00:00:00 2001 From: neauoire Date: Tue, 24 Mar 2020 20:16:59 +0900 Subject: [PATCH] Fixing issue #73 --- scripts/tool.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tool.js b/scripts/tool.js index 02ef7b4..f678d22 100644 --- a/scripts/tool.js +++ b/scripts/tool.js @@ -229,7 +229,8 @@ function Tool (client) { // Cannot cast close twice if (type === 'close') { const prev = this.layer()[this.layer().length - 1] - if (!prev || prev.type === 'close') { + console.log(this.vertices.length) + if (!prev || prev.type === 'close' || this.vertices.length !== 0) { return false } }