Commit 37fb000b authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

fix jalhyd#106 PAB deserialisation

Showing with 7 additions and 2 deletions
+7 -2
...@@ -334,8 +334,13 @@ export class FormulaireService extends Observable { ...@@ -334,8 +334,13 @@ export class FormulaireService extends Observable {
} }
// when creating a new Pab, add one wall with one device, plus the downwall // when creating a new Pab, add one wall with one device, plus the downwall
// (when loading session only) // (when loading session, those items are already present)
if (f instanceof FormulairePab && f.currentNub instanceof Pab) { if (
f instanceof FormulairePab
&& f.currentNub instanceof Pab
&& f.currentNub.children.length === 0
&& f.currentNub.downWall === undefined
) {
// 1. one wall // 1. one wall
const newWall = Session.getInstance().createNub( const newWall = Session.getInstance().createNub(
new Props({ new Props({
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment