From d6758f115385638ded1fea98bb805f1ebe46aefc Mon Sep 17 00:00:00 2001 From: gwyneblaidd Date: Mon, 18 Feb 2019 13:12:08 +0200 Subject: [PATCH] code optimization --- src/elements/element.rectangle.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/elements/element.rectangle.js b/src/elements/element.rectangle.js index c406a62b70e..973bbd040ae 100644 --- a/src/elements/element.rectangle.js +++ b/src/elements/element.rectangle.js @@ -123,13 +123,8 @@ module.exports = Element.extend({ // Find first (starting) corner with fallback to 'bottom' var borders = ['bottom', 'left', 'top', 'right']; var startCorner = borders.indexOf(borderSkipped, 0); - if (borderSkipped === null) { + if (borderSkipped === null || startCorner === -1) { startCorner = 0; - } else { - startCorner = borders.indexOf(borderSkipped, 0); - if (startCorner === -1) { - startCorner = 0; - } } function cornerAt(index) {