<commit_before>import Em from 'ember';
import { defaultValue } from 'llama-table/computed';
var computed = Em.computed;
var alias = computed.alias;
var reads = computed.reads;

/**
 * Adds some extra properties to row definitions.
 * @module controllers
 * @constructor
 * @class RowController
 * @extends Ember.ObjectProxy
 */
var RowController = Em.ObjectProxy.extend({
	content: alias('model'),
	contentIndex: computed('parentController.@each', function () {
		var array = this.get('parentController');
		var content = this;
		var index = array.indexOf(content);
		return index;
	}),
	isExpanded: false,
	height: defaultValue('model.height', 30),
	subcontentHeight: reads('height')
});

export default RowController;<commit_msg>Make sure parent controller is an array<commit_after>import Em from 'ember';
import { defaultValue } from 'llama-table/computed';
var makeArray = Em.makeArray;
var computed = Em.computed;
var alias = computed.alias;
var reads = computed.reads;

/**
 * Adds some extra properties to row definitions.
 * @module controllers
 * @constructor
 * @class RowController
 * @extends Ember.ObjectProxy
 */
var RowController = Em.ObjectProxy.extend({
	content: alias('model'),
	contentIndex: computed('parentController.@each', function () {
		var array = this.get('parentController');
		var content = this;
		var index = makeArray(array).indexOf(content);
		return index;
	}),
	isExpanded: false,
	height: defaultValue('model.height', 30),
	subcontentHeight: reads('height')
});

export default RowController;
{'fraction_non_alphanumeric': 0.12884238064094178, 'fraction_numerical': 0.002616088947024199, 'mean_word_length': 5.270491803278689, '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': '7285565', 'n_tokens_mistral': 456, 'n_tokens_neox': 438, 'n_words': 128}