From 5713bb2099c1ab48d3f463b6440bf53a9bd5d07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 19 Dec 2017 10:34:34 +0100 Subject: [PATCH] Fix embeded transport. (#7326) --- js/src/embed.js | 5 ++++- js/webpack/app.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/src/embed.js b/js/src/embed.js index 459442825..76cb75c08 100644 --- a/js/src/embed.js +++ b/js/src/embed.js @@ -66,6 +66,8 @@ class FrameSecureApi extends SecureApi { () => transport, () => 'http:' ); + + this._isConnected = false; } connect () { @@ -73,6 +75,7 @@ class FrameSecureApi extends SecureApi { this.emit('connecting'); // Fire connected event with some delay. setTimeout(() => { + this._isConnected = true; this.emit('connected'); }); } @@ -86,7 +89,7 @@ class FrameSecureApi extends SecureApi { } isConnected () { - return true; + return this._isConnected; } } diff --git a/js/webpack/app.js b/js/webpack/app.js index 793b79d53..1e0aeb5f6 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -53,7 +53,7 @@ module.exports = { cache: !isProd, devtool: isProd ? false - : '#eval', + : isEmbed ? '#source-map' : '#eval', context: path.join(__dirname, '../src'), entry, output: {