From d5d87e3572332c8ff04c5e7ade9fec238006d787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Sat, 14 Sep 2019 08:19:00 +0200 Subject: [PATCH] Don't default to Figwheel Main when no cljs Fixes #317 --- CHANGELOG.md | 2 +- calva/nrepl/jack-in.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c6ab6d1e..e3daba4f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ Changes to Calva. (We really will try to keep this updated now.) - [Support for custom project/workflow commands](https://github.com/BetterThanTomorrow/calva/issues/281) ## [Unreleased] -- Nothing to see here +- Fix [Figwheel Main deps added to non-cljs projects](https://github.com/BetterThanTomorrow/calva/issues/317) ## [2.0.36] - 12.09.2019 - Fix [REPL Window namespace being reset to user](https://github.com/BetterThanTomorrow/calva/issues/302) diff --git a/calva/nrepl/jack-in.ts b/calva/nrepl/jack-in.ts index a275b942c..bfb9d1813 100644 --- a/calva/nrepl/jack-in.ts +++ b/calva/nrepl/jack-in.ts @@ -92,11 +92,9 @@ export async function calvaJackIn() { state.extensionContext.workspaceState.update('selectedCljTypeName', projectConnectSequence.projectType); let selectedCljsType: CljsTypes; - if (projectConnectSequence.cljsType == undefined) { - selectedCljsType = CljsTypes["Figwheel Main"]; - } else if (typeof projectConnectSequence.cljsType == "string") { + if (typeof projectConnectSequence.cljsType == "string") { selectedCljsType = projectConnectSequence.cljsType; - } else { + } else if (projectConnectSequence.cljsType) { selectedCljsType = projectConnectSequence.cljsType.dependsOn; }