File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/routes/[username]/[slug] Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 123123 const macosPrefs = $derived (snapshot .macos_prefs || []);
124124 const shell = $derived (snapshot .shell || {});
125125 const git = $derived (snapshot .git || {});
126- const devTools = $derived (snapshot .dev_tools || []);
126+ const devToolsRaw = $derived (snapshot .dev_tools || []);
127+ const devTools = $derived (devToolsRaw .map ((t : any ) => typeof t === ' string' ? t : (t ?.name || String (t ))));
127128
128129 const configPkgs: { name: string ; type: string }[] = $derived (Array .isArray (data .config .packages )
129130 ? data .config .packages .map ((p : any ) => (typeof p === ' string' ? { name: p , type: ' formula' } : p ))
133134 const configApps = $derived (configPkgs .filter ((p : any ) => p .type === ' cask' ));
134135 const configNpm = $derived (configPkgs .filter ((p : any ) => p .type === ' npm' ));
135136
136- const formulae = $derived (snapshotPkgs .formulae ?.length ? snapshotPkgs .formulae : configCli .map ((p : any ) => p .name ));
137- const casks = $derived (snapshotPkgs .casks ?.length ? snapshotPkgs .casks : configApps .map ((p : any ) => p .name ));
137+ const formulaeRaw = $derived (snapshotPkgs .formulae ?.length ? snapshotPkgs .formulae : configCli .map ((p : any ) => p .name ));
138+ const casksRaw = $derived (snapshotPkgs .casks ?.length ? snapshotPkgs .casks : configApps .map ((p : any ) => p .name ));
139+
140+ const formulae = $derived (formulaeRaw .map ((f : any ) => typeof f === ' string' ? f : (f ?.name || String (f ))));
141+ const casks = $derived (casksRaw .map ((c : any ) => typeof c === ' string' ? c : (c ?.name || String (c ))));
138142 const taps = $derived (snapshotPkgs .taps || []);
139143
140144 const displayedApps = $derived (showAllApps ? casks : casks .slice (0 , 12 ));
You can’t perform that action at this time.
0 commit comments