From 7107d7e464d7bd33c8c27e7719da9dc1c630b663 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 31 May 2018 05:48:05 +0400 Subject: Correct text comparison Signed-off-by: Valentin Popov --- assets/javascript/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assets/javascript') diff --git a/assets/javascript/script.js b/assets/javascript/script.js index d17c60c..f2eb794 100644 --- a/assets/javascript/script.js +++ b/assets/javascript/script.js @@ -12,7 +12,7 @@ function updateData(artistTrack, titleTrack) { var artistElement = document.getElementById('artist'); var titleElement = document.getElementById('title'); - if (artistElement.innerHTML !== artistTrack || titleElement.innerHTML !== titleTrack) { + if (artistElement.textContent !== artistTrack || titleElement.textContent !== titleTrack) { /* Updates text */ artistElement.innerHTML = artistTrack; titleElement.innerHTML = titleTrack; -- cgit v1.2.3