فهرست منبع

Never add empty composite deltas to L1 graph

Joeri Exelmans 2 سال پیش
والد
کامیت
5d7de7180d
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/frontend/app.tsx

+ 1 - 1
src/frontend/app.tsx

@@ -393,7 +393,7 @@ export class App extends React.Component<{}, AppState> {
         // add new version to history graph + highlight the new version as the current version:
         historyGraph: setCurrentVersion(appendToHistoryGraph(historyGraph, newVersion), version, newVersion),
         // add the composite delta to the L1-graph + highlight it as 'active':
-        dependencyGraphL1: addDeltaAndActivate(dependencyGraphL1, composite),
+        dependencyGraphL1: composite.deltas.length > 0 ? addDeltaAndActivate(dependencyGraphL1, composite) : dependencyGraphL1, // never add an empty composite
         // add the primitive L0-deltas to the L0-graph + highlight them as 'active':
         dependencyGraphL0: composite.deltas.reduce(
           (graph, delta) => {