Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: guard lintClips against a truthy non-array clips argument
[._.]/ Adam Eivy87ccfd0f96b8
diff --git a/server/lib/videoPromptLinter.js b/server/lib/videoPromptLinter.jsindex d2e0604a6b..fef36e38a6 100644--- a/server/lib/videoPromptLinter.js+++ b/server/lib/videoPromptLinter.js@@ -107,8 +107,9 @@ export function lintClipPrompt(clip, { bible, maxLength = MAX_CLIP_PROMPT_LENGTH* @returns {{pass: boolean, results: Array<{index: number, pass: boolean, reasons: string[]}>}}*/export function lintClips(clips, { bible, maxLength = MAX_CLIP_PROMPT_LENGTH } = {}) {- const results = (clips || []).map((clip, index) => {- const previousFraming = clip?.previousFraming ?? clips[index - 1]?.framing ?? null;+ const clipList = Array.isArray(clips) ? clips : [];+ const results = clipList.map((clip, index) => {+ const previousFraming = clip?.previousFraming ?? clipList[index - 1]?.framing ?? null;return { index, ...lintClipPrompt({ ...clip, previousFraming }, { bible, maxLength }) };});return { pass: results.every((r) => r.pass), results };diff --git a/server/lib/videoPromptLinter.test.js b/server/lib/videoPromptLinter.test.jsindex 8b99397dd6..106d683d92 100644--- a/server/lib/videoPromptLinter.test.js+++ b/server/lib/videoPromptLinter.test.js@@ -154,6 +154,9 @@ describe('lintClips', () => {it('never throws on a non-array clips argument', () => {expect(() => lintClips(null, { bible })).not.toThrow();expect(() => lintClips(undefined, { bible })).not.toThrow();+ expect(() => lintClips('not-an-array', { bible })).not.toThrow();+ expect(() => lintClips(42, { bible })).not.toThrow();expect(lintClips(null, { bible })).toEqual({ pass: true, results: [] });+ expect(lintClips('not-an-array', { bible })).toEqual({ pass: true, results: [] });});});