fix(response-body): remove download button when content is empty (#8579)

Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>
This commit is contained in:
Krzysztof Kowalczyk
2023-04-26 13:42:49 +02:00
committed by GitHub
parent 043d5ea455
commit cdfc4de43e
3 changed files with 26 additions and 5 deletions

View File

@@ -29,6 +29,11 @@ function setUpDomEnvironment() {
}
copyProps(win, window) // use UI's built-in window wrapper
copyProps(window, global)
// https://github.com/jsdom/jsdom/issues/1721
if (typeof global.window.URL.createObjectURL === "undefined") {
Object.defineProperty(global.window.URL, "createObjectURL", { value: () => "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==" })
}
}
setUpDomEnvironment()