undefined when trying to access the method
getSelectedDocument() but the method getDocuments() works fine. According to the API doc, I should be able to get the Document or
undefined if no document is open. I for sure have a document open but I'm still getting
undefined. What I am doing wrong? I'm going a little crazy because I've read nearly everything on the doc site. 🙁
import sketch from 'sketch'
var document = sketch.getSelectedDocument();