From 9169feff3d349f58063e0bed0ff4c9172b273c1b Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 26 Jan 2022 15:02:20 +0100 Subject: [PATCH] Fix TS 4.5 errors --- script/draft-release/run.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/draft-release/run.ts b/script/draft-release/run.ts index ec9bff3c3b..9b3a05e6ac 100644 --- a/script/draft-release/run.ts +++ b/script/draft-release/run.ts @@ -120,7 +120,7 @@ export async function run(args: ReadonlyArray): Promise { console.log(`Set!`) } catch (e) { console.warn(`Setting the app version failed 😿 - (${e.message}) + (${e instanceof Error ? e.message : e}) Please manually set it to ${nextVersion} in app/package.json.`) } @@ -177,7 +177,11 @@ export async function run(args: ReadonlyArray): Promise { console.log('Added!') printInstructions(nextVersion, []) } catch (e) { - console.warn(`Writing the changelog failed 😿\n(${e.message})`) + console.warn( + `Writing the changelog failed 😿\n(${ + e instanceof Error ? e.message : e + })` + ) printInstructions(nextVersion, newEntries) } } else {