switch statment exists in js
This commit is contained in:
parent
5451f0d4cc
commit
7cc7f811b1
1 changed files with 10 additions and 8 deletions
|
@ -227,14 +227,16 @@ class Calendar {
|
||||||
_parse_vevent(vevent) {
|
_parse_vevent(vevent) {
|
||||||
const event = {}
|
const event = {}
|
||||||
vevent.forEach(elt => {
|
vevent.forEach(elt => {
|
||||||
if (elt[0] === "attendee") {
|
switch (elt[0]) {
|
||||||
if (event[elt[0]] === undefined) event[elt[0]] = []
|
case "attendee":
|
||||||
event[elt[0]].push({
|
if (event[elt[0]] === undefined) event[elt[0]] = []
|
||||||
props: elt[1],
|
event[elt[0]].push({
|
||||||
val: elt[3]
|
props: elt[1],
|
||||||
});
|
val: elt[3]
|
||||||
} else {
|
})
|
||||||
event[elt[0]] = elt[3]
|
break
|
||||||
|
default:
|
||||||
|
event[elt[0]] = elt[3]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return event
|
return event
|
||||||
|
|
Loading…
Reference in a new issue