INNER CODE UNIT · JavaScript
apply
fengshao1227/ccg-workflow · dsh-ccg/src/index.js:582
export function apply(ctx, config = {}) {
let active = config
// Ownership memory is opened ONCE, out here, not inside the matrix fiber: a
// domain name may be open only once at a time, and the matrix is disposed and
// rebuilt on every settings change. Reopening on each of those would race its
// own close. The tools read it through this getter, so a matrix built before
// the domain finished opening picks it up on its next call rather than
// capturing `undefined` forever.
let teammates
const getTable = () => teammates
let fiber = mountMatrix(ctx, active, { getTable })
const reload = async (next) => {
if (deepEqualJson(next, active)) return
active = next
const previous = fiber