Évite de planter si on demande un calendrier inexistant
This commit is contained in:
parent
6f96c37358
commit
c72d565eba
1 changed files with 5 additions and 0 deletions
|
@ -75,6 +75,11 @@
|
|||
|
||||
const flatten = d => {
|
||||
let array = [];
|
||||
|
||||
if (!d) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (Array.isArray(d)) {
|
||||
d.forEach(a => (array = array.concat(flatten(a))));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue