MCPcopy Create free account
hub / github.com/error311/FileRise / ensureSourceOption

Function ensureSourceOption

public/js/adminPanel.js:3809–3816  ·  view source on GitHub ↗
(id, label = '')

Source from the content-addressed store, hash-verified

3807 };
3808
3809 const ensureSourceOption = (id, label = '') => {
3810 const sourceId = String(id || '').trim();
3811 if (!sourceId) return;
3812 const existing = (state.sourceOptions || []).find((s) => String(s.id || '') === sourceId);
3813 if (existing) return;
3814 const sourceLabel = String(label || sourceId);
3815 state.sourceOptions = [...(state.sourceOptions || []), { id: sourceId, label: sourceLabel }];
3816 };
3817
3818 const renderSourceOptions = (preferredId = '') => {
3819 if (!sourceIdEl) return;

Callers 1

fillFormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected