Use async store
This commit is contained in:
@@ -2,7 +2,7 @@ define([
|
||||
'/common/common-util.js',
|
||||
'/bower_components/tweetnacl/nacl-fast.min.js',
|
||||
], function (Util) {
|
||||
var Nacl = self.nacl;
|
||||
var Nacl = window.nacl;
|
||||
|
||||
var uid = Util.uid;
|
||||
var signMsg = function (data, signKey) {
|
||||
@@ -140,7 +140,7 @@ types of messages:
|
||||
|
||||
var send = ctx.send = function (type, msg, cb) {
|
||||
if (!ctx.connected && type !== 'COOKIE') {
|
||||
return void self.setTimeout(function () {
|
||||
return void setTimeout(function () {
|
||||
cb('DISCONNECTED');
|
||||
});
|
||||
}
|
||||
@@ -185,7 +185,7 @@ types of messages:
|
||||
|
||||
send.unauthenticated = function (type, msg, cb) {
|
||||
if (!ctx.connected) {
|
||||
return void self.setTimeout(function () {
|
||||
return void setTimeout(function () {
|
||||
cb('DISCONNECTED');
|
||||
});
|
||||
}
|
||||
@@ -276,7 +276,7 @@ types of messages:
|
||||
|
||||
var send = ctx.send = function (type, msg, cb) {
|
||||
if (!ctx.connected) {
|
||||
return void self.setTimeout(function () {
|
||||
return void setTimeout(function () {
|
||||
cb('DISCONNECTED');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user