update error handling, but leave the note to come back
This commit is contained in:
parent
67d1347bd8
commit
1d63419df8
@ -1373,9 +1373,11 @@ define([
|
||||
|
||||
console.log('Posting CONNECT');
|
||||
postMessage('CONNECT', cfg, function (data) {
|
||||
// XXX validate that data exists, probably return otherwise.
|
||||
// XXX data should always exist
|
||||
// this indicates a false condition in sharedWorker
|
||||
// got here via a reference error:
|
||||
// uncaught exception: TypeError: data is undefined
|
||||
if (!data) { throw new Error('FALSE_INIT'); }
|
||||
if (data.error) { throw new Error(data.error); }
|
||||
if (data.state === 'ALREADY_INIT') {
|
||||
data = data.returned;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user