Текст <p><strong>Instrument:</strong> должен быть скрыт в профиле, если выбрана роль band. Однако, при регистрации в профиле текст Instrument: остается пустым, когда должно быть скрыто. p.s: пожалуйста, используй квадратные кавычки, иначе мой код не будет работать

register.ejs:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" href="/css/main.css" />
    <title>Register as a Musician</title>
  </head>
  <body>
    <header>
      <nav>
        <ul>
          <li><a href="/">Home</a></li>
          <li><a href="/register">Register</a></li>
          <li><a href="/search">Search</a></li>
        </ul>
      </nav>
    </header>
    <main>
      <h1>Register as a Musician</h1>
      <form method="post" enctype="multipart/form-data">
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>
  
  <label for="role">Role</label>
  <select id="role" name="role" required  onchange="showInstrument(this.value)">
    <option value="">Select a role</option>
    <option value="Band">A band</option>
    <option value="Artist">Artist</option>
  </select>

  <label for="genre">Genre</label>
  <select id="genre" name="genre" required>
    <option value="">Select a genre</option>
    <option value="Rock">Rock</option>
    <option value="Pop">Pop</option>
    <option value="Hip hop">Hip hop</option>
    <option value="Electronic">Electronic</option>
  </select>

  <label for="instrument" id="instrument-label">Instrument</label>
<select id="instrument" name="instrument">
    <option value="">Select a instrument</option>
    <option value="Bass">Bass</option>
    <option value="Rythm guitar">Rythm guitar</option>
    <option value="Lead guitar">Lead guitar</option>
    <option value="Vocal">Vocal</option>
  </select>

  <label for="soundcloud">SoundCloud URL</label>
  <input type="url" id="soundcloud" name="soundcloud">

  <label for="password">Password</label>
  <input type="password" id="password" name="password" required>

  <label for="location">Location</label>
  <input type="text" id="location" name="location" required>

  <label for="login">Login</label>
  <input type="text" id="login" name="login" required>

  <label for="thumbnail">Thumbnail</label>
  <input type="file" id="thumbnail" name="thumbnail">

  <button type="submit">Register</button>
</form>
    </main>
	
	<script>
function showInstrument(role) {
  if (role === 'Artist') {
    document.querySelector('#instrument-label').style.display = 'block';
    document.querySelector('#instrument').style.display = 'block'; 
  } else {
    document.querySelector('#instrument-label').style.display = 'none';
    document.querySelector('#instrument').style.display = 'none';
  }
}
</script>
	
  </body>
</html>

profile.ejs:

<!DOCTYPE html>
<html>
  <head>
    <title><%= musician.name %> - Musician Profile</title>
  </head>
  <body>
    <img src="/img/<%= musician.thumbnail %>" alt="<%= musician.name %>">
    <h1><%= musician.name %></h1>
	<p><strong>Role:</strong> <%= musician.role %></p>
    <p><strong>Genre:</strong> <%= musician.genre %></p>
   <p><strong>Instrument:</strong>
  <% if (musician.role === 'band' && musician.instrument) { %>
  <p><strong>Instrument:</strong> <%= musician.instrument %></p>
<% } %>
</p>
    <p><strong>Location:</strong> <%= musician.location %></p>
    <p><strong>Bio:</strong> <%= musician.bio %></p>
	<% if (musician.soundcloud) { %>
	<iframe width="50%" height="150" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<%= musician.soundcloud %>&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe> 
	<% } %>
	<% if (musician.soundcloud1) { %>
	<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<%= musician.soundcloud1 %>&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe> 
<% } %>
    <% if (userLoggedIn && username === musician.name) { %>
      <a href="/profile/<%= musician.id %>/edit">Edit profile</a>

      <div id="edit-profile-modal" class="modal">
        <div class="modal-content">
          <span class="close">&times;</span>
          <h2>Edit Profile</h2>
          <form action="/profile/<%= musician.id %>/edit" method="POST" enctype="multipart/form-data">
            <div>
              <label for="name">Name:</label>
              <input type="text" id="name" name="name" value="<%= musician.name %>">
            </div>
			<div>
              <label for="name">Role:</label>
              <input type="role" id="role" name="role" value="<%= musician.role %>">
            </div>
            <div>
              <label for="genre">Genre:</label>
              <input type="text" id="genre" name="genre" value="<%= musician.genre %>">
            </div>
            <div>
              <label for="instrument">Instrument:</label>
              <input type="text" id="instrument" name="instrument" value="<%= musician.instrument %>">
            </div>
            <div>
              <label for="location">Location:</label>
              <input type="text" id="location" name="location" value="<%= musician.location %>">
            </div>
            <div>
              <label for="bio">Bio:</label>
              <textarea id="bio" name="bio"><%= musician.bio %></textarea>
            </div>

            <div>
            <label for="soundcloud">Song 1:</label>
            <input type="text" id="soundcloud" name="soundcloud" value="<%= musician.soundcloud %>">
          </div>
		  
		  <div>
            <label for="soundcloud">Song 2:</label>
            <input type="text" id="soundcloud1" name="soundcloud1" value="<%= musician.soundcloud1 %>">
          </div>
		  
          <div>
            <label for="thumbnail">Thumbnail:</label>
            <input type="file" id="thumbnail" name="thumbnail">
          </div>
          <button type="submit">Save</button>
        </form>
      </div>
    </div>

			<!-- 
                <div> 
				<input type="text" name="soundcloud[]" placeholder="Soundcloud track URL"> 
				<button type="button" class="add-music-button">Add Music</button> 
				</div>
              </div>
            </div>

            <div>
              <label for="thumbnail">Thumbnail:</label>
              <input type="file" id="thumbnail" name="thumbnail">
            </div>

            <button type="submit">Save</button>
          </form>
        </div>
      </div> -->
    <% } %>

    <script>
      
 const modal = document.getElementById("edit-profile-modal");
      const btn = document.getElementsByTagName("a")[0];
      const span = document.getElementsByClassName("close")[0];

      btn.onclick = function() {
        modal.style.display = "block";
      }

      span.onclick = function() {
        modal.style.display = "none";
      }

      window.onclick = function(event) {
        if (event.target == modal) {
          modal.style.display = "none";
        }
      }
	  
	  //скрыть плеер, если ссылка не внесена
	const song1Input = document.getElementById("soundcloud");
const song2Input = document.getElementById("soundcloud1");
const player1 = document.getElementsByTagName('iframe')[0];
const player2 = document.getElementsByTagName('iframe')[1];
let songs = {
  song: "",
  song1: ""
}

function hidePlayer(player) {
    player.src = "";
    player.style.display = "none";
}

function updateSongs() {
  songs.song = song1Input.value.trim();
  songs.song1 = song2Input.value.trim();
}

function updatePlayers() {
  if (songs.song !== "") {
    player1.src = `https://w.soundcloud.com/player/?url=${songs.song}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`;
    player1.style.display = "block";
  } else {
    hidePlayer(player1);
  }

  if (songs.song1 !== "") {
    player2.src = `https://w.soundcloud.com/player/?url=${songs.song1}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`;
    player2.style.display = "block";
  } else {
    hidePlayer(player2);
  }
}

song1Input.addEventListener("input", function() {
  updateSongs();
  updatePlayers();
});

song2Input.addEventListener("input", function() {
  updateSongs();
  updatePlayers();
});

updateSongs();
updatePlayers();
//Валидация ссылок с soundcloud
function updatePlayers() {
  if (isValidSoundcloudUrl(songs.song)) {
    player1.src = `https://w.soundcloud.com/player/?url=${songs.song}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`;
    player1.style.display = "block";
  } else {
    hidePlayer(player1);
  }

  if (isValidSoundcloudUrl(songs.song1)) {
    player2.src = `https://w.soundcloud.com/player/?url=${songs.song1}&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true`;
    player2.style.display = "block";
  } else {
    hidePlayer(player2);
  }
}

function isValidSoundcloudUrl(url) {
  const regex = /^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;
  return regex.test(url);
}
    </script>
	<style>
	
</style>
  </body>
</html>