From b8e94ac3bc1ee42e4f6e15331bf50468104543ba Mon Sep 17 00:00:00 2001 From: raphaelrpl Date: Mon, 27 Aug 2018 09:46:07 -0300 Subject: [PATCH] Fix update alert when no view is selected. --- webapp/core/DataManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/core/DataManager.js b/webapp/core/DataManager.js index c744526f3..dcde7a4b4 100644 --- a/webapp/core/DataManager.js +++ b/webapp/core/DataManager.js @@ -5017,7 +5017,7 @@ var DataManager = module.exports = { if(alert.AlertAttachment) { var alertAttachment = alert.AlertAttachment.get(); - if(alert.View.ServiceInstance.ServiceMetadata) { + if(alert.View && alert.View.ServiceInstance.ServiceMetadata) { for(var i = 0, serviceMetadataLength = alert.View.ServiceInstance.ServiceMetadata.length; i < serviceMetadataLength; i++) { if(alert.View.ServiceInstance.ServiceMetadata[i].dataValues.key === "maps_server") { alertAttachment.geoserverUri = alert.View.ServiceInstance.ServiceMetadata[i].dataValues.value;