Skip to content

Commit

Permalink
Use Figma's built-in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
efedorenko committed Dec 13, 2019
1 parent 7649535 commit c688ee5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}

Expand All @@ -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.');
}
}

Expand Down

0 comments on commit c688ee5

Please sign in to comment.