Commit 1805b8b
committed
fix(domains): prevent empty logo strings in domain form submission
- Extract logo field separately for better validation
- Add explicit type checking and whitespace trimming
- Only include logo in payload when valid and changed
- Prevents API validation error: 'Invalid image format' for empty strings
Fixes issue where toggling Custom QR code logo switch would send empty
string to API, causing unprocessable_entity error.1 parent d13af21 commit 1805b8b
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
216 | | - | |
217 | | - | |
| 225 | + | |
| 226 | + | |
218 | 227 | | |
219 | 228 | | |
220 | 229 | | |
| |||
0 commit comments