check for null ports in reusable assignment
_.each(self.model.reusableTemplateConnections,function(conn) {
var inputPort = conn.inputPortDisplayName;
var port = self.connectionMap[inputPort];
+ if(port != undefined) {
assignedPortIds.push(port.id);
+ }
});
var selectedPortIds = '';
if(assignedPortIds.length >0) {
RegisterTemplateService.getTemplateProcessorDatasourceDefinitions(self.model.nifiTemplateId,selectedPortIds ).then(function(response){
var map = {};
+ if(response && response.data) {
//merge in those already selected/saved on this template
_.each(response.data, function (def) {
def.selectedDatasource = false;
return 2;
}
});
+
+ }
self.loadingProcessorDatasources = false;
});
+
};
