Skip to content

Commit

Permalink
Update code.js
Browse files Browse the repository at this point in the history
Fixed:
If only one non-text layer is selected, the notification "0 Text Layer names reset ✅" will not be shown.

Changed:
The notification for non-text layers is now more informative.
  • Loading branch information
tank666 authored and megaroeny committed Apr 11, 2021
1 parent de474ab commit 4eb54cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ figma.currentPage.selection.forEach(node => {
successCount++
}
else {
figma.notify(node.name + " not a Text Layer", { timeout: 2000 })
figma.notify('For "' + node.name + '" the name is not reset. Select the Text Layer.')
}
})

if (layerCount >= 1) {
if (layerCount >= 1 && successCount >= 1) {
figma.notify(successCount + " Text Layer names reset ✅", { timeout: 2000 })
}

Expand Down

0 comments on commit 4eb54cd

Please sign in to comment.