Skip to content

Import javascript has null values on non-import pages #3547

@harsohailB

Description

@harsohailB

Description

  • As import elements do not exist on non-import pages, adding an event listener through javascript results in an undefined error to be thrown in the console

Screen Shot 2022-05-21 at 1 02 23 PM

Existing gem(s), file(s) needing updating, changing or deleting

N/A

New file(s) needing creating

app/javascript/src/import.js

  • Add condition to only run the respective code when the elements exist

Metadata

Metadata

Assignees

Labels

codethechangecode.the.change developersjavascriptTouches JavaScript code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions