Fix embeded transport. (#7326)

This commit is contained in:
Tomasz Drwięga 2017-12-19 10:34:34 +01:00 committed by Jaco Greeff
parent 1d9206735b
commit 5713bb2099
2 changed files with 5 additions and 2 deletions

View File

@ -66,6 +66,8 @@ class FrameSecureApi extends SecureApi {
() => transport, () => transport,
() => 'http:' () => 'http:'
); );
this._isConnected = false;
} }
connect () { connect () {
@ -73,6 +75,7 @@ class FrameSecureApi extends SecureApi {
this.emit('connecting'); this.emit('connecting');
// Fire connected event with some delay. // Fire connected event with some delay.
setTimeout(() => { setTimeout(() => {
this._isConnected = true;
this.emit('connected'); this.emit('connected');
}); });
} }
@ -86,7 +89,7 @@ class FrameSecureApi extends SecureApi {
} }
isConnected () { isConnected () {
return true; return this._isConnected;
} }
} }

View File

@ -53,7 +53,7 @@ module.exports = {
cache: !isProd, cache: !isProd,
devtool: isProd devtool: isProd
? false ? false
: '#eval', : isEmbed ? '#source-map' : '#eval',
context: path.join(__dirname, '../src'), context: path.join(__dirname, '../src'),
entry, entry,
output: { output: {