Add checks
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
eb50218a8d
commit
208dfed7fb
@ -14,9 +14,9 @@ export class TemporalService {
|
||||
}
|
||||
|
||||
selectedDate(itemLayer:IItemLayer):string {
|
||||
let temporalItemLayer = itemLayer as ITemporalItemLayer;
|
||||
if(temporalItemLayer.selectedItemLayer) {
|
||||
if(temporalItemLayer.selectedItemLayer.item.dataDate && temporalItemLayer.selectedItemLayer.item.dataEndDate) {
|
||||
let temporalItemLayer = itemLayer as ITemporalItemLayer;
|
||||
if(temporalItemLayer && temporalItemLayer.selectedItemLayer) {
|
||||
if(temporalItemLayer && temporalItemLayer.selectedItemLayer.item.dataDate && temporalItemLayer.selectedItemLayer.item.dataEndDate) {
|
||||
let sd = new Date(Date.parse(temporalItemLayer.selectedItemLayer.item.dataDate));
|
||||
let ed = new Date(Date.parse(temporalItemLayer.selectedItemLayer.item.dataEndDate));
|
||||
return this.timespanService$.getCaption(sd,ed);
|
||||
@ -30,7 +30,7 @@ export class TemporalService {
|
||||
|
||||
nextDate(itemLayer:IItemLayer):string {
|
||||
let temporalItemLayer = itemLayer as ITemporalItemLayer;
|
||||
if(temporalItemLayer.nextItemLayer.item) {
|
||||
if(temporalItemLayer && temporalItemLayer.nextItemLayer && temporalItemLayer.nextItemLayer.item) {
|
||||
if(temporalItemLayer.nextItemLayer.item.dataDate && temporalItemLayer.nextItemLayer.item.dataEndDate) {
|
||||
let sd = new Date(Date.parse(temporalItemLayer.nextItemLayer.item.dataDate));
|
||||
let ed = new Date(Date.parse(temporalItemLayer.nextItemLayer.item.dataEndDate));
|
||||
@ -50,7 +50,7 @@ export class TemporalService {
|
||||
|
||||
previousDate(itemLayer:IItemLayer):string {
|
||||
let temporalItemLayer = itemLayer as ITemporalItemLayer;
|
||||
if(temporalItemLayer.previousItemLayer.item) {
|
||||
if(temporalItemLayer && temporalItemLayer.previousItemLayer && temporalItemLayer.previousItemLayer.item) {
|
||||
if(temporalItemLayer.previousItemLayer.item.dataDate && temporalItemLayer.previousItemLayer.item.dataEndDate) {
|
||||
let sd = new Date(Date.parse(temporalItemLayer.previousItemLayer.item.dataDate));
|
||||
let ed = new Date(Date.parse(temporalItemLayer.previousItemLayer.item.dataEndDate));
|
||||
|
Loading…
Reference in New Issue
Block a user