function sort(grid, event, onDoubleClick) {
    var columnProperties;
    if (
        event.isHeaderCell &&
        !(columnProperties = event.columnProperties).unsortable &&
        !(columnProperties.sortOnDoubleClick ^ onDoubleClick) // both same (true or falsy)?
    ) {
        grid.fireSyntheticColumnSortEvent(event.gridCell.x, event.primitiveEvent.detail.keys);
    }

    if (this.next) {
        this.next[onDoubleClick ? 'handleDoubleClick' : 'handleClick'](grid, event);
    }
}
@memberOf ColumnSorting.prototype
@param {Hypergrid} grid
@param {Object} event - the event details