6 Replies Latest reply on Jun 24, 2012 3:51 PM by xbytor2

    Extendscript (JS): How to guard undefined object properties?

    mrcalph Level 1

      Just picked up this Extendscript for a quick utility function. I can't seem to use any of the "usual" Javascript logic contstructs to test for undefined object properties.



      typeof(app.activeDocument) === "undefined"


      This is an *error* in Extendscript (Error 1302: No such element). I don't believe it should be, but if I'm supposed to do something different in Extendscript I am all ears.


      Thank you


      Edit: Now posted to the correct forum.