@@ -7,7 +7,6 @@ import { tracked } from '@glimmer/tracking';
77import type { LiveQuery , Store } from 'ember-orbit' ;
88
99import type { RecordOperationTerm } from '@orbit/records' ;
10- import { TrackedArray } from 'tracked-built-ins' ;
1110
1211import type ApplicationController from 'swach/controllers/application' ;
1312import type ColorModel from 'swach/data-models/color' ;
@@ -169,7 +168,7 @@ export default class PalettesController extends Controller {
169168 ...attributes ,
170169 createdAt : new Date ( ) ,
171170 } ;
172- const colorsList = new TrackedArray ( targetList . map ( ( c ) => c . $identity ) ) ;
171+ const colorsList = targetList . map ( ( c ) => c . $identity ) ;
173172
174173 const existingColor = targetList . find ( ( c ) => c . hex === sourceColor . hex ) ;
175174
@@ -211,9 +210,7 @@ export default class PalettesController extends Controller {
211210 sourcePalette : PaletteModel ,
212211 targetIndex : number ,
213212 ) : Promise < void > {
214- const sourceColorList = new TrackedArray (
215- sourceList . map ( ( c ) => c . $identity ) ,
216- ) ;
213+ const sourceColorList = sourceList . map ( ( c ) => c . $identity ) ;
217214 const colorToMove = sourceColorList . find ( ( c ) => c . id === sourceColor . id ) ;
218215
219216 if ( colorToMove ) {
@@ -237,9 +234,7 @@ export default class PalettesController extends Controller {
237234 targetIndex : number ,
238235 targetPalette : PaletteModel ,
239236 ) : Promise < void > {
240- const sourceColorOrder = new TrackedArray (
241- sourceList . map ( ( c ) => c . $identity ) ,
242- ) ;
237+ const sourceColorOrder = sourceList . map ( ( c ) => c . $identity ) ;
243238 const colorToRemove = sourceColorOrder . find ( ( c ) => c . id === sourceColor . id ) ;
244239
245240 if ( colorToRemove ) {
@@ -253,9 +248,7 @@ export default class PalettesController extends Controller {
253248
254249 if ( ! targetPalette . isColorHistory ) {
255250 let insertIndex = targetIndex ;
256- const targetColorOrder = new TrackedArray (
257- targetList . map ( ( c ) => c . $identity ) ,
258- ) ;
251+ const targetColorOrder = targetList . map ( ( c ) => c . $identity ) ;
259252 const existingColor = targetList . find (
260253 ( c ) => c . hex === sourceColor . hex ,
261254 ) ;
0 commit comments