Making WordPress.org

Changeset 12807


Ignore:
Timestamp:
08/04/2023 07:12:07 AM (20 months ago)
Author:
coffee2code
Message:

Photo Directory, Admin: Prevent JS errors in certain contexts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/assets/js/admin.js

    r12790 r12807  
    4242            photoDescription.classList.remove(missingDescription);
    4343        } else {
    44             photoDescription.classList.add(missingDescription);
     44            photoDescription?.classList.add(missingDescription);
    4545        }
    4646    }
    4747    setDescriptionHighlight();
    48     photoDescription.addEventListener('input', e => setDescriptionHighlight());
     48    photoDescription?.addEventListener('input', e => setDescriptionHighlight());
    4949
    5050    // Highlight custom taxonomies lacking terms.
Note: See TracChangeset for help on using the changeset viewer.