mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 19:51:12 -05:00
Fix: Type safety and unit validation
This commit is contained in:
@@ -556,8 +556,8 @@ export function extractChangedFields<T extends Record<string, any>>(
|
||||
// ═══ SPECIAL HANDLING: LOCATION OBJECTS ═══
|
||||
// Location can be an object (from form) vs location_id (from DB)
|
||||
if (key === 'location' && newValue && typeof newValue === 'object') {
|
||||
const oldLoc = originalData.location as any;
|
||||
if (!oldLoc || !isEqual(oldLoc, newValue)) {
|
||||
const oldLoc = originalData.location;
|
||||
if (!oldLoc || typeof oldLoc !== 'object' || !isEqual(oldLoc, newValue)) {
|
||||
changes[key as keyof T] = newValue;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user