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

[bug] Erreur sur la page de rapport annuel lors d'un changement d'année. #61

Closed
lpofredc opened this issue May 3, 2023 · 0 comments
Closed

Comments

@lpofredc
Copy link

lpofredc commented May 3, 2023

Le changement d'année sur la page de rapport annuel provoque deux erreurs distinctes:

ERROR TypeError: e.newSpeciesData[0] is undefined
ERROR TypeError: e.obsByGroupData[0] is undefined

En cause, la fonction refreshGraphValues du fichier annual_report.component.ts qui ne réinitialise pas ces deux variables telles qu'elles sont initialement déclarées (ARRAY contenant un object VS ARRAY vide).

public obsByGroupData = [
{
data: [],
},
];
public obsByGroupLabel = [];
public obsByGroupColor = [{ backgroundColor: [], borderWidth: 0.8 }];
public newSpeciesData = [
{
data: [],
},
];

VS

refreshGraphValues() {
this.obsByGroupData = [];
this.obsByGroupLabel = [];
this.newSpeciesData = [];
this.newSpeciesLabel = [];

Pour reproduire, aller sur le site de démo, https://demo.geonature.fr/geonature/#/dashboard/annual_report et changer l'année de restitution avec le debugger ouvert.

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