We purge it [here](https://github.com/facebook/react/blob/b11540ccb2321aeb7259fcf0b3a38aeeea35231d/src/isomorphic/ReactDebugTool.js#L88-L89) but this code doesn’t run because of the [early exit](https://github.com/facebook/react/blob/b11540ccb2321aeb7259fcf0b3a38aeeea35231d/src/isomorphic/ReactDebugTool.js#L53-L57).

Need to fix this and add a test case to make sure we don’t regress on it.

var previousOperations = ReactNativeOperationHistoryDevtool.getHistory();
    if (previousMeasurements.length || previousOperations.length) {
      var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs();
      flushHistory.push({
        duration: performanceNow() - previousStartTime,
        measurements: previousMeasurements || [],
        operations: previousOperations || [],
        treeSnapshot: registeredIDs.reduce((tree, id) => {
          var ownerID = ReactComponentTreeDevtool.getOwnerID(id);
          var parentID = ReactComponentTreeDevtool.getParentID(id);
          tree[id] = {
            displayName: ReactComponentTreeDevtool.getDisplayName(id),
            text: ReactComponentTreeDevtool.getText(id),
            updateCount: ReactComponentTreeDevtool.getUpdateCount(id),
            childIDs: ReactComponentTreeDevtool.getChildIDs(id),
            
            ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID),
            parentID,
          };
          return tree;
        }, {}),
      });
    }
    currentFlushStartTime = performanceNow();
    currentFlushMeasurements = [];
    ReactComponentTreeDevtool.purgeUnmountedComponents();
    ReactNativeOperationHistoryDevtool.clearHistory();
  }
}
function checkDebugID(debugID) {