Fixing issue with relationships.

This commit is contained in:
mike12345567 2021-02-15 18:53:20 +00:00
parent 1a2b9bbef4
commit 245cd0a791
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ exports.createLinkView = async appId => {
const designDoc = await db.get("_design/database") const designDoc = await db.get("_design/database")
const view = { const view = {
map: function(doc) { 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 doc1 = doc.doc1
let doc2 = doc.doc2 let doc2 = doc.doc2
emit([doc1.tableId, doc1.rowId], { emit([doc1.tableId, doc1.rowId], {