Skip to content

Commit e412650

Browse files
committed
fix(image): preserve embedInZpl when editing storage device/name
Device-selector and name-input both rebuilt storedAs as { device, name } without the existing embedInZpl flag. Silent regression: a user setting recall-only (embedInZpl=false) and then changing the device would silently flip back to the default (true), re-emitting ~DY uploads the user explicitly opted out of. Spread the existing storedAs so embedInZpl survives partial updates.
1 parent 5b0200b commit e412650

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/registry/image.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ export const image: ObjectTypeDefinition<ImageProps> = {
338338
onChange={(e) =>
339339
onChange({
340340
storedAs: {
341+
...storedAs,
341342
device: e.target.value as StorageDevice,
342-
name: storedAs.name,
343343
},
344344
})
345345
}
@@ -363,7 +363,7 @@ export const image: ObjectTypeDefinition<ImageProps> = {
363363
// is a clearer constraint signal than a tooltip.
364364
if (!next) return;
365365
onChange({
366-
storedAs: { device: storedAs.device, name: next },
366+
storedAs: { ...storedAs, name: next },
367367
});
368368
}}
369369
/>

0 commit comments

Comments
 (0)