Properly instantiate context.connection before init

This commit is contained in:
Quincy Morgan
2020-07-21 10:19:40 -04:00
parent 6c73391d8f
commit 3d0590de87
+3 -3
View File
@@ -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