« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index 25664148..ef38ba6b 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -196,6 +196,18 @@ export default {
         relation('generateTrackList', track.referencedTracks);
     }
 
+    // Section: Sampled tracks
+
+    if (!empty(track.sampledTracks)) {
+      const samples = sections.samples = {};
+
+      samples.heading =
+        relation('generateContentHeading');
+
+      samples.list =
+        relation('generateTrackList', track.sampledTracks);
+    }
+
     // Section: Tracks that reference
 
     if (!empty(track.referencedByTracks)) {
@@ -210,18 +222,6 @@ export default {
           sprawl.divideTrackListsByGroups);
     }
 
-    // Section: Sampled tracks
-
-    if (!empty(track.sampledTracks)) {
-      const samples = sections.samples = {};
-
-      samples.heading =
-        relation('generateContentHeading');
-
-      samples.list =
-        relation('generateTrackList', track.sampledTracks);
-    }
-
     // Section: Tracks that sample
 
     if (!empty(track.sampledByTracks)) {
@@ -436,30 +436,30 @@ export default {
             sec.references.list,
           ],
 
-          sec.referencedBy && [
-            sec.referencedBy.heading
+          sec.samples && [
+            sec.samples.heading
               .slots({
-                id: 'referenced-by',
+                id: 'samples',
                 title:
-                  language.$('releaseInfo.tracksThatReference', {
+                  language.$('releaseInfo.tracksSampled', {
                     track: html.tag('i', data.name),
                   }),
               }),
 
-            sec.referencedBy.list,
+            sec.samples.list,
           ],
 
-          sec.samples && [
-            sec.samples.heading
+          sec.referencedBy && [
+            sec.referencedBy.heading
               .slots({
-                id: 'samples',
+                id: 'referenced-by',
                 title:
-                  language.$('releaseInfo.tracksSampled', {
+                  language.$('releaseInfo.tracksThatReference', {
                     track: html.tag('i', data.name),
                   }),
               }),
 
-            sec.samples.list,
+            sec.referencedBy.list,
           ],
 
           sec.sampledBy && [