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 } }