Skip to content

Commit

Permalink
Fix #84 missing null check on sanitizeDisambiguation
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia authored Sep 24, 2024
1 parent 8b6d91d commit 9f8d01a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/_lib/makeTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { ExtendedMediaItem } from "./Caches/ExtendedTrackItem";
import { Album, TrackItem } from "neptune-types/tidal";
import type { MediaItem } from "./Caches/MediaItemCache";

const sanitizeDisambiguation = (d?: string): string | false => {
if (d === undefined) return false;
const sanitizeDisambiguation = (d?: string | null): string | false => {
if (d === undefined || d === null) return false;
let _d = d.toLowerCase();
if (_d.startsWith("deluxe")) return "Deluxe";
if (_d.includes("explicit") || _d.includes("48khz") || _d.includes("96khz") || _d.includes("24bit") || _d.includes("24-bit") || _d.includes("mastered for itunes")) return false;
Expand Down

0 comments on commit 9f8d01a

Please sign in to comment.