diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-10-04 23:24:30 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-10-04 23:24:30 +0200 |
commit | ac60dd147a15d2890828ae38b818685416477c09 (patch) | |
tree | 394d58680e72cd6ec5e136d138ffd4ebbc3cd48c /static/vevent.ts | |
parent | Major typescript work. (diff) | |
parent | Work on calendar from event in frontend, broken. (diff) | |
download | calp-ac60dd147a15d2890828ae38b818685416477c09.tar.gz calp-ac60dd147a15d2890828ae38b818685416477c09.tar.xz |
Merge branch 'new-js' into typescript
Diffstat (limited to '')
-rw-r--r-- | static/vevent.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/static/vevent.ts b/static/vevent.ts index 72ab28b1..9d6cec88 100644 --- a/static/vevent.ts +++ b/static/vevent.ts @@ -196,19 +196,18 @@ function xml_to_vcal(xml: Element): VEvent { let property_map = new Map() if (properties) { - for (var i = 0; i < properties.childElementCount; i++) { + property_loop: for (var i = 0; i < properties.childElementCount; i++) { let tag = properties.childNodes[i]; if (!(tag instanceof Element)) continue; let parameters = {}; let value: VEventValue | VEventValue[] = []; - for (var j = 0; j < tag.childElementCount; j++) { + value_loop: for (var j = 0; j < tag.childElementCount; j++) { let child = tag.childNodes[j]; if (!(child instanceof Element)) continue; - switch (tag.tagName) { - case 'parameters': - parameters = /* TODO handle parameters */ {}; - break; - + if (child.tagName == 'parameters') { + parameters = /* TODO handle parameters */ {}; + continue value_loop; + } else switch (tag.tagName) { /* These can contain multiple value tags, per RFC6321 3.4.1.1. */ case 'categories': |