Ensure terser doesn't tree-shake iso8601-js-period

This commit is contained in:
Starbeamrainbowlabs 2019-04-14 21:49:15 +01:00
parent a45001a75f
commit 90fd9da348
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@ class MapManager {
}
setup_time_dimension() {
// Ensure terser doesn't tree-shake iso8601-js-period
if(nezasa.iso8601.period)
console.debug("iso8601-js-period is loaded.");
this.layer_time = new L.TimeDimension({
period: "PT1H", // 1 hour
timeInterval: `2019-01-01T12:00:00Z/${new Date().toISOString()}`