Skip to content

Commit

Permalink
sort libraries array
Browse files Browse the repository at this point in the history
  • Loading branch information
Pausansol committed Nov 6, 2020
1 parent c6421be commit 538bca1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import styles from './ui/styles'
import mainView from './main-view'

const theme = sketch.UI.getTheme()
const libraries = sketch.getLibraries().filter(l => l.valid && l.enabled)
const librariesArray = sketch.getLibraries().filter(l => l.valid && l.enabled)
const libraries = librariesArray.sort((a, b) => (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1)
const pluginName = __command.pluginBundle().name()
const doc = sketch.getSelectedDocument()

Expand Down

0 comments on commit 538bca1

Please sign in to comment.