Skip to content

Commit

Permalink
Small Fixes for TypeScript Errors
Browse files Browse the repository at this point in the history
Fixed some TypeScript errors (that were not affecting code functionality) but just needed to add some error handling for them.
  • Loading branch information
anishsudini committed Oct 30, 2024
1 parent d5378fb commit 2b92aeb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/extensions/playlistExtension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ const initPlaylistPageLogic = () => {
presetItem.style.color = "white";
presetItem.addEventListener("click", () => {
inputElement.value = preset;
presetName = preset; // Update presetName when a dropdown item is selected
dropdownContainer.style.display = "none";
applyOverlayZIndex("");
});
Expand Down Expand Up @@ -279,12 +278,12 @@ const initPlaylistPageLogic = () => {
customOrderButton.insertAdjacentHTML('beforebegin', buttonHTML);

setupPresetDropdown(playlistID);

document.getElementById("savePresetBtn").addEventListener("click", () => {
document.getElementById("savePresetBtn")?.addEventListener("click", () => {
const presetName = (document.getElementById("presetNameInput") as HTMLInputElement).value;
savePreset(presetName, playlistID);
});
document.getElementById("loadPresetBtn").addEventListener("click", () => {

document.getElementById("loadPresetBtn")?.addEventListener("click", () => {
const presetName = (document.getElementById("presetNameInput") as HTMLInputElement).value;
loadPreset(presetName, playlistID);
});
Expand Down

0 comments on commit 2b92aeb

Please sign in to comment.