1.37 Geojson removal as datasource from promise?

I am loading a geojson datasource on 1.37 when I go to remove the entries and lines affiliated with this geojson all the labels and other entities are removed but the lines, I understand their is something like trying to remove a promise and I am a bit confused could someone help with the function to make it where it can be removed?
function rd() {
var pipes = Cesium.GeoJsonDataSource.load('pipe.geojson', {
    stroke: Cesium.Color.BLUE.withAlpha(0.5),
    fill: Cesium.Color.BLUE.withAlpha(0.5),
    strokeWidth: 3
});
pipes.then(function(dataSource) {
   viewer.dataSources.add(dataSource);
   var entities = dataSource.entities.values;
   for (var i = 0; i < entities.length; i++) {
       var entity = entities[i];
            var positions = entity.polyline.positions.getValue(viewer.clock.currentTime);
            var boundingSphere = Cesium.BoundingSphere.fromPoints(positions);
            var origin = boundingSphere.center;
            viewer.entities.add({
                position : origin,
                label : {
                    text : entity.name,
                    verticalOrigin : Cesium.VerticalOrigin.BASELINE
                },
                font : '4pt monospace',
                style: Cesium.LabelStyle.FILL,
                color: Cesium.Color.BLUE,
            });
          }
});
}

Can you show the code you’re using to remove the entities?

function rmall() {viewer.entities.removeAll(); }

function rmall() {viewer.entities.removeAll(); }

That should be removing all entities, so it might be a bug if it’s not.

Are you able to reproduce this on Sandcastle? (https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/) if so, can you share a link to it? (Click “Share” at the top and post the link here).