From ef8acc5d50fa3c23bd7c9d4bb720b7ff78581981 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 19 Aug 2023 14:13:31 -0300 Subject: clean up imports & miscellaneous metastructures across codebase --- src/data/things/track.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/data/things/track.js') diff --git a/src/data/things/track.js b/src/data/things/track.js index 36e3adbe..e176acb4 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -1,10 +1,10 @@ -import Thing from './thing.js'; +import {inspect} from 'node:util'; -import {inspect} from 'util'; +import {color} from '#cli'; +import find from '#find'; +import {empty} from '#sugar'; -import {color} from '../../util/cli.js'; -import find from '../../util/find.js'; -import {empty} from '../../util/sugar.js'; +import Thing from './thing.js'; export class Track extends Thing { static [Thing.referenceType] = 'track'; @@ -47,7 +47,15 @@ export class Track extends Thing { hasCoverArt: { flags: {update: true, expose: true}, - update: {validate: isBoolean}, + update: { + validate(value) { + if (value !== false) { + throw new TypeError(`Expected false or null`); + } + + return true; + }, + }, expose: { dependencies: ['albumData', 'coverArtistContribsByRef'], -- cgit 1.3.0-6-gf8a5