Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix addEventListener error #44

@broken-helix

Description

@broken-helix

Lighthouse error:

Browser errors were logged to the console

Errors logged to the console indicate unresolved problems. They can come from network request failures and other browser concerns. Learn more about this errors in console diagnostic audit
Source
Description
vercel.app 1st Party…js/script.js:28:12(zen-bot.vercel.app)
TypeError: Cannot read properties of null (reading 'addEventListener') at https://zen-bot.vercel.app/assets/js/script.js:28:13

Affected code

// if the user presses enter, generate the prompt
promptInput.addEventListener("keyup", (e) => {
    if (e.key === "Enter") {
        generate();
    }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions