Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


JS - How to detect Deleted object on list?

Participant ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

Hey

 

I have a list of layers [].

Its a bit messy... but for the sake of "lets make it work", how can I detect if item is Deleted so I don't try to perform actions on it without wrapping it all in a try/else... In debug its marked as [error] "Object is invalid"

 

 

TOPICS
Actions and scripting

Views

40

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

LATEST

What kind of data does the array contain and how do you use it to access the layers? How are layers removed while the script is running?

If you can control the removal of layers, then it would be logical to synchronously remove them from the array.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines