mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
Fix: View Images button logic
This commit is contained in:
8
main.js
8
main.js
@@ -172,11 +172,9 @@ function displayResults(data) {
|
|||||||
};
|
};
|
||||||
document.getElementById('view-images').onclick = (e) => {
|
document.getElementById('view-images').onclick = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (data.filmstrip && data.filmstrip.length > 0) {
|
// Data might exist on server even if filmstrip array is empty in this object
|
||||||
window.open(`/images.html?id=${data.id}`, '_blank');
|
console.log("Opening images page for test:", data.id);
|
||||||
} else {
|
window.open(`/images.html?id=${data.id}`, '_blank');
|
||||||
alert('No images available.');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user