Skip to content

Commit 6503eaf

Browse files
committed
stop reusing a variable for the pair produced by init
1 parent ccd61a7 commit 6503eaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Elm/Kernel/Platform.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ function _Platform_initialize(flagDecoder, args, init, update, subscriptions, st
3737
var result = A2(__Json_run, flagDecoder, __Json_wrap(args ? args['flags'] : undefined));
3838
__Result_isOk(result) || __Debug_crash(2 /**__DEBUG/, __Json_errorToString(result.a) /**/);
3939
var managers = {};
40-
result = init(result.a);
41-
var model = result.a;
40+
var initPair = init(result.a);
41+
var model = initPair.a;
4242
var stepper = stepperBuilder(sendToApp, model);
4343
var ports = _Platform_setupEffects(managers, sendToApp);
4444

@@ -49,7 +49,7 @@ function _Platform_initialize(flagDecoder, args, init, update, subscriptions, st
4949
_Platform_enqueueEffects(managers, pair.b, subscriptions(model));
5050
}
5151

52-
_Platform_enqueueEffects(managers, result.b, subscriptions(model));
52+
_Platform_enqueueEffects(managers, initPair.b, subscriptions(model));
5353

5454
return ports ? { ports: ports } : {};
5555
}

0 commit comments

Comments
 (0)