Skip to content

Commit e727961

Browse files
committed
Use an EmberArray instead of a regular one
This code was under the assumption that the prototype extensions were enabled, which isn't a certainty in projects, and which is removed in Ember 6. We now default to an EmberArray instead.
1 parent 2cbef9d commit e727961

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addon/components/au-data-table.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { typeOf } from '@ember/utils';
33
import { computed, observer } from '@ember/object';
44
import { bool, equal, oneWay } from '@ember/object/computed';
55
import Component from '@ember/component';
6+
import { A } from '@ember/array';
67

78
// Source: https://github.com/mu-semtech/ember-data-table/blob/c690a3948b2d9d5f91d69f0a935c6b5cdb4862ca/addon/components/data-table.js
89
const DataTable = Component.extend({
910
init() {
1011
this._super(...arguments);
11-
if (this.selection === undefined) this.set('selection', []);
12+
if (this.selection === undefined) this.set('selection', A());
1213
},
1314
noDataMessage: 'No data',
1415
isLoading: false,

0 commit comments

Comments
 (0)