From c688ee53f95fac91470bc3912d646ec616bc1411 Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Fri, 13 Dec 2019 16:30:01 -0500 Subject: [PATCH] Use Figma's built-in error messages --- src/code.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/code.ts b/src/code.ts index 62867db..b810375 100644 --- a/src/code.ts +++ b/src/code.ts @@ -23,7 +23,7 @@ function convertTextToTitleCase(node: TextNode) { }); } else if (!alertOnce) { alertOnce = true; - alert('Can’t modify text layer with multiple fonts.'); + figma.notify('Can’t modify text layer with multiple fonts.'); } } @@ -32,10 +32,10 @@ for (const node of figma.currentPage.selection) { if (!node.hasMissingFont) { convertTextToTitleCase(node); } else { - alert('The font used in selected layer is missing.'); + figma.notify('The font used in selected layer is missing.'); } } else { - alert('Selected layer has no text.'); + figma.notify('Selected layer has no text.'); } }