From 60562bc113052a9e3befc1c009f662c61d7271b8 Mon Sep 17 00:00:00 2001 From: FelisDiligens <47528453+FelisDiligens@users.noreply.github.com> Date: Fri, 10 May 2024 12:23:54 +0200 Subject: [PATCH] fix: variable `error` accidentally shadowed --- src/cmPlugin/cmUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmPlugin/cmUtils.ts b/src/cmPlugin/cmUtils.ts index c9dabf6..14a525e 100644 --- a/src/cmPlugin/cmUtils.ts +++ b/src/cmPlugin/cmUtils.ts @@ -302,14 +302,14 @@ export async function replaceRange(cm, context, getNewRange: Function, done: Fun if (done) done({ row: selection.row, column: selection.column }); } - catch (error) { + catch (e) { await context.postMessage({ name: 'alert', - text: error.toString(), + text: e.toString(), title: "Error" }); if (error) - error(error); + error(e); } } else {