|
@@ -412,15 +412,20 @@ export class App extends React.Component<{}, AppState> {
|
|
|
const {corr: corrComposite, as: asComposite, csOverrides, asOverrides} = this.parser.parse(csComposite,
|
|
|
this.state.cs.version, this.state.corr.version, this.state.as.version);
|
|
|
|
|
|
+
|
|
|
const newCsVersion = this.state.cs.versionRegistry.createVersion(this.state.cs.version, csComposite);
|
|
|
- const newAsVersion = this.state.as.versionRegistry.createVersion(this.state.as.version, asComposite);
|
|
|
+
|
|
|
+ const newAsVersion = (asComposite.deltas.length > 0) ?
|
|
|
+ this.state.as.versionRegistry.createVersion(this.state.as.version, asComposite)
|
|
|
+ : this.state.as.version; // do not create a new AS version
|
|
|
+
|
|
|
const newCorrVersion = this.state.corr.versionRegistry.createVersion(this.state.corr.version, corrComposite,
|
|
|
embed(
|
|
|
["cs", newCsVersion, csOverrides],
|
|
|
["as", newAsVersion, asOverrides],
|
|
|
));
|
|
|
|
|
|
- // This also trigggers a state update:
|
|
|
+ // This also trigggers a few state updates:
|
|
|
this.state.cs.graphDeltaExecutor.exec(csComposite);
|
|
|
this.state.corr.graphDeltaExecutor.exec(corrComposite);
|
|
|
this.state.as.graphDeltaExecutor.exec(asComposite);
|