Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme appears to reference a non-existent function #104

Open
tomasz-niedzwiedz-wttech opened this issue Jul 27, 2023 · 0 comments
Open

Theme appears to reference a non-existent function #104

tomasz-niedzwiedz-wttech opened this issue Jul 27, 2023 · 0 comments

Comments

@tomasz-niedzwiedz-wttech

Hi,

we've created a new theme based on the sources provided in the standard site template. We've added ESlint with @typescript-eslint/parser to validate our code and it's picked up something awkward in languagenavigation.ts. A seemingly undefined function, closeNavigationGroup, is attached to an event.

We couldn't find a definition of closeNavigationGroup anywhere in the theme codebase or in AEM Core Components. Is this some external dependency that we could just add as a global to our linter's configuration or is this just accidentally missing?

Expected Behaviour

TypeScript code passes validation.

Actual Behaviour

https://github.com/Lauraa1003/aem-site-template-standard/blob/a9ca6f1aa4a0edb1a4a3b84f91a27426a13e22ed/theme/src/components/languagenavigation/languagenavigation.ts#L78 references the closeNavigationGroup function that isn't defined in the same file or any of the imports. Both the IDE and the linter point this out as an error.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Build theme code with .eslint enabled or import it into an IDE with TypeScript support. Inspect errors.

Platform and Version

Theme code from version 2.2.0 of the aem-site-template-standard

Sample Code that illustrates the problem

https://github.com/Lauraa1003/aem-site-template-standard/blob/a9ca6f1aa4a0edb1a4a3b84f91a27426a13e22ed/theme/src/components/languagenavigation/languagenavigation.ts#L78

Logs taken while reproducing problem

TS2304: Cannot find name 'closeNavigationGroup'.

CC @alicja-wierzbicka-wttech

Thanks,
Tomek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant