From 6a9cc760535cbd7d33f55eb903d3a83cbbd372e8 Mon Sep 17 00:00:00 2001 From: Flaze <51487578+flazepe@users.noreply.github.com> Date: Tue, 19 Jul 2022 03:51:14 +0800 Subject: [PATCH] fix: account default render option --- src/routes/image.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/routes/image.js b/src/routes/image.js index 985d2bbe..98fe57e9 100644 --- a/src/routes/image.js +++ b/src/routes/image.js @@ -56,10 +56,7 @@ export async function get(req, event) { _length = 7; } // render - let pixelated = false; - if (req.query.render === 'pixelated') { - pixelated = true; - } + let pixelated = req.query.render ? req.query.render === 'pixelated' : settings.defaults.render === 'pixelated'; // get times from KV and set time asynchronously (no await) const count = Number.parseInt(await KV.get(id)) || 0;