Skip to content

Commit fbbef52

Browse files
committed
Move shouldProxy closer to its only usage
1 parent 1b4c6cb commit fbbef52

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

extra/Lamdera/Injection.hs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,6 @@ injections outputType =
175175
& subtract 1
176176

177177
previousVersion = show_ previousVersionInt
178-
179-
shouldProxy =
180-
onlyIf (outputType == LamderaLive)
181-
[text|
182-
shouldProxy = $$author$$project$$LocalDev$$shouldProxy(msg)
183-
|]
184178
in
185179
case outputType of
186180
-- NotLamdera was added when we fixed the hot loading of a new app version in the browser.
@@ -353,6 +347,13 @@ injections outputType =
353347

354348
-- LamderaFrontend or LamderaLive
355349
_ ->
350+
let
351+
shouldProxy =
352+
onlyIf (outputType == LamderaLive)
353+
[text|
354+
shouldProxy = $$author$$project$$LocalDev$$shouldProxy(msg)
355+
|]
356+
in
356357
[text|
357358
function _Platform_initialize(flagDecoder, args, init, update, subscriptions, stepperBuilder)
358359
{

0 commit comments

Comments
 (0)