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;

@@ -70,16 +70,46 @@
 puted';%0A
+var makeArray = Em.makeArray;%0A
 var comp
@@ -550,21 +550,32 @@
 index = 
+makeArray(
 array
+)
 .indexOf

Make sure parent controller is an array