<commit_before>import React, { Component } from 'react';

// Components
import Route from './route.jsx';

// Fast and Cheap images
let time = require('../../assets/time-w-baloon.svg');
let price = require('../../assets/price-w-baloon.svg');
let priceTime = require('../../assets/price-time-w-baloon.svg');

class ExpandedRouteList extends Component {
  constructor(props) {
    super(props);
    this.state = {
      0: 'expanded-price',
      1: 'expanded-money'
    };
  }
  renderRoutes() {
    let routes = [];
    let key = 0;
    for (let route in this.props.routes) {
      let marker = route === 'time' ? time : price;
      let eprice = this.props.routes.price;
      let etime = this.props.routes.time;
      if (eprice.avg_estimate === etime.avg_estimate &&
          eprice.display_name === etime.display_name &&
          eprice.duration     === etime.duration) {
        marker = priceTime;
        routes.push(
          <Route
          key={key++}
          route={this.props.routes.price}
          selectRoute={this.props.selectRoute}
          classStyle={route}
          marker={marker}
          />
          );
        return routes;
      }
      if (this.props.routes[route] !== null) {
        routes.push(<Route
          key={key++}
          route={this.props.routes[route]}
          selectRoute={this.props.selectRoute}
          classStyle={route}
          marker={marker}
          />
        );
      }
    }
    return routes;
  }
  render() {
    return (
      <div className="expanded-routes">
        <ul>
          {this.renderRoutes()}
        </ul>
      </div><commit_msg>[fix] Fixed early return on route render.<commit_after>import React, { Component } from 'react';

// Components
import Route from './route.jsx';

// Fast and Cheap images
let time = require('../../assets/time-w-baloon.svg');
let price = require('../../assets/price-w-baloon.svg');
let priceTime = require('../../assets/price-time-w-baloon.svg');

class ExpandedRouteList extends Component {
  constructor(props) {
    super(props);
    this.state = {
      0: 'expanded-price',
      1: 'expanded-money'
    };
  }
  renderRoutes() {
    let routes = [];
    let key = 0;
    for (let route in this.props.routes) {
      let marker = route === 'time' ? time : price;
      let eprice = this.props.routes.price;
      let etime = this.props.routes.time;
      if (eprice.avg_estimate === etime.avg_estimate &&
          eprice.display_name === etime.display_name &&
          eprice.duration     === etime.duration) {
        routes.push(
          <Route
          key={key++}
          route={this.props.routes.price}
          selectRoute={this.props.selectRoute}
          classStyle={route}
          marker={priceTime}
          />
          );
        return routes;
      }
      if (this.props.routes[route] !== null) {
        routes.push(<Route
          key={key++}
          route={this.props.routes[route]}
          selectRoute={this.props.selectRoute}
          classStyle={route}
          marker={marker}
          />
        );
      }
    }
    return routes;
  }
  render() {
    return (
      <div className="expanded-routes">
        <ul>
          {this.renderRoutes()}
        </ul>
      </div>
{'fraction_non_alphanumeric': 0.1516836577077541, 'fraction_numerical': 0.0018535681186283596, 'mean_word_length': 1.925022583559169, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '237188', 'n_tokens_mistral': 983, 'n_tokens_neox': 994, 'n_words': 191}