« get me outta code hell

test: Track.coverArtFileExtension (unit) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-31 19:22:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-05 21:02:56 -0300
commit6f54b1211b5b07fe747ce4ebafdf917ce7851324 (patch)
treebf6869bee6eaf99c8dd13abe7cbb0618aaa43935 /src/data/things
parentf0a94d03d01220ff44c9c7cf610373781dd4c09d (diff)
test: Track.coverArtFileExtension (unit)
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/track.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index ad90dd2c..0b34de20 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -90,7 +90,9 @@ export class Track extends Thing {
       Thing.composite.exposeDependencyOrContinue('#album.trackCoverArtFileExtension'),
 
       // Fallback to 'jpg'.
-      Thing.composite.exposeConstant('jpg'),
+      Thing.composite.exposeConstant('jpg', {
+        update: {validate: isFileExtension},
+      }),
     ]),
 
     // Date of cover art release. Like coverArtFileExtension, this represents