fix: strip null synth_engine from project JSON
- Frontend serialize: use undefined instead of null for synth_engine - Backend validate: strip None synth_engine from tracks before schema validation - Prevents 'None is not of type object' schema error
This commit is contained in:
@@ -6137,7 +6137,7 @@ const serializeTracksList = (tracksList, secondsPerBar) => {
|
||||
soundfont_id: t.soundfont_id || (t.synth_engine ? t.synth_engine.soundfont_id : null),
|
||||
soundfont_bank: t.soundfont_bank !== undefined ? t.soundfont_bank : (t.synth_engine ? t.synth_engine.soundfont_bank : null),
|
||||
soundfont_program: t.soundfont_program !== undefined ? t.soundfont_program : (t.synth_engine ? t.synth_engine.soundfont_program : null),
|
||||
synth_engine: t.synth_engine || null,
|
||||
synth_engine: t.synth_engine || undefined,
|
||||
items: items
|
||||
};
|
||||
});
|
||||
@@ -6209,7 +6209,7 @@ const deserializeTracksList = (schemaTracks, secondsPerBar, sectionStore) => {
|
||||
soundfont_id: t.soundfont_id || null,
|
||||
soundfont_bank: t.soundfont_bank !== null ? t.soundfont_bank : undefined,
|
||||
soundfont_program: t.soundfont_program !== null ? t.soundfont_program : undefined,
|
||||
synth_engine: t.synth_engine || null
|
||||
synth_engine: t.synth_engine || undefined
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user