Skip to content

Commit

Permalink
Bug fix: Component instances
Browse files Browse the repository at this point in the history
Fixed the bug that prevented the plugin from successfully resetting text layers inside component instances:
#1
  • Loading branch information
megaroeny committed Apr 9, 2021
1 parent b87199b commit e6f0fe3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let layerCount = (figma.currentPage.selection.length);
figma.currentPage.selection.forEach(node => {
if (node.type == 'TEXT') {
node.autoRename = true;
node.name = "";
figma.closePlugin(layerCount + " Text layer names reset ✅");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let layerCount = (figma.currentPage.selection.length)

figma.currentPage.selection.forEach(node => {
if (node.type == 'TEXT') {
node.autoRename = true;
node.name = "";
figma.closePlugin(layerCount + " Text layer names reset ✅");
return
}
Expand Down

0 comments on commit e6f0fe3

Please sign in to comment.