fix(materi): type-cast tags as string[] to satisfy tsc (CI gate)
tsc reported 'Property some does not exist on type {}' on doc.tags
because Drizzle jsonb inference returns a generic object. Cast explicitly.
This unblocks the GMW GitHub Actions deploy (test job).
This commit is contained in:
@@ -104,7 +104,7 @@ export async function searchMateri(
|
||||
const contentMatch = doc.content
|
||||
.toLowerCase()
|
||||
.includes(query.toLowerCase());
|
||||
const tagMatch = (doc.tags ?? []).some((t) =>
|
||||
const tagMatch = ((doc.tags as string[]) ?? []).some((t) =>
|
||||
t.toLowerCase().includes(query.toLowerCase()),
|
||||
);
|
||||
if (titleMatch || contentMatch || tagMatch) {
|
||||
|
||||
Reference in New Issue
Block a user