From 4877386e8624bf89b8662c292cfab9ce5954e01b Mon Sep 17 00:00:00 2001 From: D065023 Date: Tue, 8 Jun 2021 14:48:12 +0200 Subject: [PATCH] A bit more fault tolerant (e.g. when only one service is mocked) --- suppliers/srv/mashup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suppliers/srv/mashup.js b/suppliers/srv/mashup.js index a6ef1d5a..f2079922 100644 --- a/suppliers/srv/mashup.js +++ b/suppliers/srv/mashup.js @@ -37,7 +37,7 @@ module.exports = async()=>{ // called by server.js // Subscribe to changes in the S4 origin of Suppliers data S4bupa.on ('BusinessPartner.Changed', async msg => { //> would be great if we had batch events from S/4 let replica = await SELECT.one('ID').from (Suppliers) .where ({ID: msg.data.BusinessPartner}) - return replicate (replica.ID) + if (replica) return replicate (replica.ID) }) /**