2 Replies Latest reply on May 31, 2012 10:24 AM by mrcalph

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

    mrcalph

      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.

       

      Example:

      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