From 75ab618c054e8a12ee064c15a493388c8d8eac50 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Apr 2018 14:20:09 +0100 Subject: [PATCH] Fix variable scopes --- src/Lifecycle.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 6c35c6ed06..7e8107c8b7 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -66,12 +66,13 @@ import sdk from './index'; * failed. */ export function loadSession(opts) { + let enableGuest = opts.enableGuest || false; + const guestHsUrl = opts.guestHsUrl; + const guestIsUrl = opts.guestIsUrl; + const fragmentQueryParams = opts.fragmentQueryParams || {}; + const defaultDeviceDisplayName = opts.defaultDeviceDisplayName; + return new Promise.resolve().then(() => { - const fragmentQueryParams = opts.fragmentQueryParams || {}; - let enableGuest = opts.enableGuest || false; - const guestHsUrl = opts.guestHsUrl; - const guestIsUrl = opts.guestIsUrl; - const defaultDeviceDisplayName = opts.defaultDeviceDisplayName; if (!guestHsUrl) { console.warn("Cannot enable guest access: can't determine HS URL to use");