From 9e1041d9d73c93f062a28938feb43a2a5353ba69 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 19 Apr 2021 11:20:24 -0400 Subject: [PATCH] update --- demo/node.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/demo/node.js b/demo/node.js index 0c9f8639..3b5dbb4f 100644 --- a/demo/node.js +++ b/demo/node.js @@ -54,9 +54,8 @@ async function detect(input) { log.info('Loading image:', input); if (input.startsWith('http')) { const res = await fetch(input); - const mime = res.headers.get('content-type'); if (res && res.ok) buffer = await res.buffer(); - else log.error('Invalid image URL:', input, res.status, res.statusText, mime); + else log.error('Invalid image URL:', input, res.status, res.statusText, res.headers.get('content-type')); } else { buffer = fs.readFileSync(input); }