I've built a list of symbol masters from selected symbols instances:
const masters = document.selectedLayers.layers
layer.type === "SymbolInstance"
.map(layer => layer.master)
Some of the masters appear more than once in the array because they have multiple instances.
Why doesn't this remove the duplicates?
const uniqueMasters = new Set(masters)
How can I solve this? I want to do something for each master and I'd prefer not to run the function more than is necessary.