fix: empty procedure arrays in serialization (#6872)

This commit is contained in:
Beka Westberg
2023-03-13 08:55:27 -07:00
committed by GitHub
parent 9236b4e207
commit 67dd6dfe00

View File

@@ -138,8 +138,9 @@ export class ProcedureSerializer<ProcedureModel extends IProcedureModel,
/** Serializes the procedure models of the given workspace. */
save(workspace: Workspace): State[]|null {
return workspace.getProcedureMap().getProcedures().map(
const save = workspace.getProcedureMap().getProcedures().map(
(proc) => saveProcedure(proc));
return save.length ? save : null;
}
/**