Last active
August 29, 2015 13:57
-
-
Save uhunkler/9427584 to your computer and use it in GitHub Desktop.
Empty selection bug - Sketch 2.4.3 - OS X 10.9.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doc.showMessage('sel: ' + selection.length()); | |
log(selection.length()); | |
for (var i = 0; i < selection.length(); i++) | |
{ | |
var layer = selection[i]; | |
log(layer); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the script is run with a new opened document and no selection
selection.length()
should return 0. Instead the script does not run and no log messages are created. When I then select a layer the script works correct. And after deselecting the layer again the scripts logs0
.