Skip to content

ReferenceError: Prism is not defined in admin-edit.js #230

@shsteimer

Description

@shsteimer

Error from Error Analyzer

View in Error Analyzer

Root Cause

formatCode() calls Prism.highlightElement() but Prism.js is loaded asynchronously via loadPrism(). The formatCode function can be invoked via input or submit event handlers before the async script load completes, causing a ReferenceError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions