From caf5025e344548cd8f496cc3873a590cc9c11914 Mon Sep 17 00:00:00 2001 From: Tomasz Pietrek Date: Wed, 4 Oct 2023 16:28:51 +0200 Subject: [PATCH] Fix linting Signed-off-by: Tomasz Pietrek --- bin/{os_compatibility_test.ts => os_compatibility.ts} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename bin/{os_compatibility_test.ts => os_compatibility.ts} (97%) diff --git a/bin/os_compatibility_test.ts b/bin/os_compatibility.ts similarity index 97% rename from bin/os_compatibility_test.ts rename to bin/os_compatibility.ts index 2da2c8e7..87c76a62 100644 --- a/bin/os_compatibility_test.ts +++ b/bin/os_compatibility.ts @@ -144,8 +144,10 @@ const getLink = async function (m: Msg): Promise { const bucket = await js.views.os(testRequest.bucket); const object = await bucket.getBlob(testRequest.object); - const hash = sha256(object); - m.respond(hash); + if (object) { + const hash = sha256(object); + m.respond(hash); + } }; const putLink = async function (m: Msg): Promise { @@ -164,7 +166,7 @@ const putLink = async function (m: Msg): Promise { m.respond(); }; -const result = function (test: String) { +const result = function (test: string) { return function (message: Msg): Promise { if (message.headers) { console.log(`test ${test} failed`);