Skip loading if string is empty

This commit is contained in:
Jade Ellis 2024-06-16 19:07:50 +01:00
parent 9351d7ebeb
commit 5a14125e7b
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2

View file

@ -16,6 +16,10 @@
let value = "";
let output = "";
async function process(str: string) {
if (value === "") {
output = "";
return
}
let result = await minify(str)
if (typeof result.code == "string") {
output = result.code