<commit_before>var Fluxxor = require('fluxxor');
var Immutable = require('immutable');
var React = require('react');

var Default = require('./themes/Default');
var Empty = require('./themes/Empty');
var Feed = require('./themes/Feed');
var Mini = require('./themes/Mini');
var Single = require('./themes/Single');

var helpers = require('../../helpers');

var Player = React.createClass({
    mixins: [
        Fluxxor.FluxMixin(React),
        Fluxxor.StoreWatchMixin('PlayerInstanceStore'),
        require('./mixins/PlayerControls')
    ],
    getStateFromFlux: function() {
        var PlayerInstanceStore = this.getFlux().store('PlayerInstanceStore');
        var TrackStore = this.getFlux().store('TrackStore');
        var instance = PlayerInstanceStore.getStateByID(this.props.id);
        var nextTrackID = instance.get('nextTrack');

        if(!instance) {
            React.unmountComponentAtNode(this.refs.root.getDOMNode().parentElement);
            return;
        }<commit_msg>Prevented error when destroying player instances.<commit_after>var Fluxxor = require('fluxxor');
var Immutable = require('immutable');
var React = require('react');

var Default = require('./themes/Default');
var Empty = require('./themes/Empty');
var Feed = require('./themes/Feed');
var Mini = require('./themes/Mini');
var Single = require('./themes/Single');

var helpers = require('../../helpers');

var Player = React.createClass({
    mixins: [
        Fluxxor.FluxMixin(React),
        Fluxxor.StoreWatchMixin('PlayerInstanceStore'),
        require('./mixins/PlayerControls')
    ],
    getStateFromFlux: function() {
        var PlayerInstanceStore = this.getFlux().store('PlayerInstanceStore');
        var TrackStore = this.getFlux().store('TrackStore');
        var instance = PlayerInstanceStore.getStateByID(this.props.id);

        if(!instance) {
            React.unmountComponentAtNode(this.refs.root.getDOMNode().parentElement);
            return;
        }

        var nextTrackID = instance.get('nextTrack');
{'fraction_non_alphanumeric': 0.15540207202762704, 'fraction_numerical': 0.0, 'mean_word_length': 3.506666666666667, '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': '7641492', 'n_tokens_mistral': 585, 'n_tokens_neox': 562, 'n_words': 107}