From 3d0590de870db5a9c56519f70a48ac2c75e08eee Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Tue, 21 Jul 2020 10:19:40 -0400 Subject: [PATCH] Properly instantiate context.connection before init --- modules/core/context.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/context.js b/modules/core/context.js index 8b59144be..fe0564010 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -88,7 +88,9 @@ export function coreContext() { /* Straight accessors. Avoid using these if you can. */ - let _connection; + // Instantiate the connection here because it doesn't require passing in + // `context` and it's needed for pre-init calls like `preauth` + let _connection = services.osm; let _history; let _validator; let _uploader; @@ -529,8 +531,6 @@ export function coreContext() { _photos = rendererPhotos(context); _ui = uiInit(context); - - _connection = services.osm; } // Set up objects that might need to access properties of `context`. The order