From 2852b49ca4dcda7de0c3ca80ac5ec28aa0e35384 Mon Sep 17 00:00:00 2001 From: emyarod Date: Mon, 14 Dec 2020 13:35:23 -0600 Subject: [PATCH] fix(sketch): remove autoapplied gray borders from sketch package (#7429) * fix(sharedStyles): remove autoapplied gray borders from sketch package * refactor(shared): remove unused border clear Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/sketch/src/commands/icons/shared.js | 2 -- packages/sketch/src/tools/sharedStyles.js | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sketch/src/commands/icons/shared.js b/packages/sketch/src/commands/icons/shared.js index a3bbdf5cefbd..b6f6eb85f854 100644 --- a/packages/sketch/src/commands/icons/shared.js +++ b/packages/sketch/src/commands/icons/shared.js @@ -188,8 +188,6 @@ function createSVGArtboards( }); } - shape.style.borders = []; - for (const layer of transparent) { layer.remove(); } diff --git a/packages/sketch/src/tools/sharedStyles.js b/packages/sketch/src/tools/sharedStyles.js index 2226f1834c3d..f987317c57b6 100644 --- a/packages/sketch/src/tools/sharedStyles.js +++ b/packages/sketch/src/tools/sharedStyles.js @@ -35,12 +35,14 @@ export function syncSharedStyle( // If none exists, we can create one from scratch if (!sharedStyle) { - return SharedStyle.fromStyle({ + const generatedSharedStyle = SharedStyle.fromStyle({ name, style, styleType, document, }); + generatedSharedStyle.style.borders = []; + return generatedSharedStyle; } // Otherwise, we'll go and update values of the sharedStyle with the given