<commit_before>import * as Marionette from 'backbone.marionette';
import {history} from 'backbone'
import Config from '../../Config'
import {props} from '../decorators'

class Controller extends Marionette.Object {
    @props({
        behaviors: {
            Radio: {
                breadcrumb: {
                    replace: '_onRoute'
                }
            }
        }
    })

    _onRoute() {
        const route = history.getFragment().split('/')[0];

        Config.navigation.each(function (model) {
            model.set('_active', model.get('route') === route);
        });
    }
}

export default new Controller();<commit_msg>Removed Radio-behavior (not supported by Marionette.Object)<commit_after>import * as Marionette from 'backbone.marionette';
import {history} from 'backbone'
import Config from '../../Config'
import channels from '../../channels'

class Controller extends Marionette.Object {
    initialize() {
        this.listenTo(channels.breadcrumb, 'replace', this._onRoute);
    }

    _onRoute() {
        const route = history.getFragment().split('/')[0];

        Config.navigation.each(function (model) {
            model.set('_active', model.get('route') === route);
        });
    }
}

export default new Controller();
{'fraction_non_alphanumeric': 0.14591593973037273, 'fraction_numerical': 0.0015860428231562252, 'mean_word_length': 2.4575342465753423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5307455', 'n_tokens_mistral': 351, 'n_tokens_neox': 341, 'n_words': 82}