fix: resolve typecheck errors in seed scripts
Add non-null assertions for array indexing in prisma/seed.ts and scripts/seed-districts.ts to satisfy strict TypeScript checks. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -257,7 +257,7 @@ async function seedDistrictProperties() {
|
||||
|
||||
for (const { district, wards } of districts) {
|
||||
const ward = wards[0];
|
||||
const template = PROPERTY_TEMPLATES[created % PROPERTY_TEMPLATES.length];
|
||||
const template = PROPERTY_TEMPLATES[created % PROPERTY_TEMPLATES.length]!;
|
||||
const loc = coords[district] ?? { lat: 10.0, lng: 106.0 };
|
||||
// Small random offset so each property has unique coords
|
||||
const jitterLat = (Math.random() - 0.5) * 0.005;
|
||||
|
||||
Reference in New Issue
Block a user