Check whether the browser supports performance.measure/mark before calling them. Fixes https://github.com/cmdr2/stable-diffusion-ui/pull/757

This commit is contained in:
cmdr2
2023-01-09 19:33:23 +05:30
parent 73af7f5481
commit 3ed4d792b3
2 changed files with 10 additions and 4 deletions

View File

@@ -440,7 +440,10 @@ function getUncompletedTaskEntries() {
}
function makeImage() {
performance.mark('click-makeImage')
if (typeof performance == "object" && performance.mark) {
performance.mark('click-makeImage')
}
if (!SD.isServerAvailable()) {
alert('The server is not available.')
return