MCPcopy Create free account
hub / github.com/TruthHun/BookStack / propagate

Function propagate

static/mergely/lib/codemirror.js:7733–7742  ·  view source on GitHub ↗
(doc, skip, sharedHist)

Source from the content-addressed store, hash-verified

7731 // Call f for all linked documents.
7732 function linkedDocs(doc, f, sharedHistOnly) {
7733 function propagate(doc, skip, sharedHist) {
7734 if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
7735 var rel = doc.linked[i];
7736 if (rel.doc == skip) continue;
7737 var shared = sharedHist && rel.sharedHist;
7738 if (sharedHistOnly && !shared) continue;
7739 f(rel.doc, shared);
7740 propagate(rel.doc, doc, shared);
7741 }
7742 }
7743 propagate(doc, null, true);
7744 }
7745

Callers 1

linkedDocsFunction · 0.70

Calls 1

fFunction · 0.70

Tested by

no test coverage detected