Unable to render polyline arrow.

Trying to have directional arrow lines, I'm attempting to do so using this example:

var entity = viewer.entities.add({
  polyline : {
    positions : Cesium.Cartesian3.fromDegreesArray([-77, 35,
                          -77.1, 35]),
    width : 5,
    material : new Cesium.PolylineArrowMaterialProperty({
      color : Cesium.Color.ORANGE
    })
  }
});
viewer.zoomTo(viewer.entities);

This however returns -

An error occurred while rendering. Rendering has stopped.
undefined
TypeError: Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
    at UniformFloatVec4.set

PolylineArrowMaterialProperty does not take an object in it’s constructor, but instead takes a color directly. Change your code to the below and everything works.

new Cesium.PolylineArrowMaterialProperty(Cesium.Color.ORANGE)