ical-generator 8.0.1-develop.7 → 8.0.1-develop.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/event.ts +5 -5
package/package.json
CHANGED
package/src/event.ts
CHANGED
|
@@ -938,7 +938,7 @@ export default class ICalEvent {
|
|
|
938
938
|
}
|
|
939
939
|
if (location && (
|
|
940
940
|
('title' in location && !location.title) ||
|
|
941
|
-
(location?.geo && (!isFinite(location.geo.lat) || !isFinite(location.geo.lon))) ||
|
|
941
|
+
(location?.geo && (typeof location.geo.lat !== 'number' || !isFinite(location.geo.lat) || typeof location.geo.lon !== 'number' || !isFinite(location.geo.lon))) ||
|
|
942
942
|
(!('title' in location) && !location?.geo)
|
|
943
943
|
)) {
|
|
944
944
|
throw new Error(
|
|
@@ -1791,11 +1791,11 @@ export default class ICalEvent {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
|
|
1793
1793
|
// GEO
|
|
1794
|
-
if (this.data.location
|
|
1795
|
-
g += 'GEO:' + escape(this.data.location.geo
|
|
1796
|
-
escape(this.data.location.geo
|
|
1794
|
+
if (this.data.location?.geo?.lat && this.data.location.geo.lon) {
|
|
1795
|
+
g += 'GEO:' + escape(this.data.location.geo.lat, false) + ';' +
|
|
1796
|
+
escape(this.data.location.geo.lon, false) + '\r\n';
|
|
1797
1797
|
}
|
|
1798
|
-
|
|
1798
|
+
|
|
1799
1799
|
// DESCRIPTION
|
|
1800
1800
|
if (this.data.description) {
|
|
1801
1801
|
g += 'DESCRIPTION:' + escape(this.data.description.plain, false) + '\r\n';
|