From 734d3fe496f5184b9a425bfa1f3eaa689feaf79e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 15 Feb 2021 18:53:20 +0000 Subject: [PATCH] Fixing issue with relationships. --- packages/server/src/db/linkedRows/linkUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/db/linkedRows/linkUtils.js b/packages/server/src/db/linkedRows/linkUtils.js index ee22a87410..c07c17eda7 100644 --- a/packages/server/src/db/linkedRows/linkUtils.js +++ b/packages/server/src/db/linkedRows/linkUtils.js @@ -24,7 +24,8 @@ exports.createLinkView = async appId => { const designDoc = await db.get("_design/database") const view = { map: function(doc) { - if (doc.type === FieldTypes.LINK) { + // everything in this must remain constant as its going to Pouch, no external variables + if (doc.type === "link") { let doc1 = doc.doc1 let doc2 = doc.doc2 emit([doc1.tableId, doc1.rowId], {