Fix error with compute_when_synced
This commit is contained in:
parent
90c82a6a02
commit
0441b83f74
@ -105,7 +105,7 @@ module.exports =
|
|||||||
# @param f {Function} Will be executed on the PeerJs-Connector context.
|
# @param f {Function} Will be executed on the PeerJs-Connector context.
|
||||||
#
|
#
|
||||||
whenSynced: (args)->
|
whenSynced: (args)->
|
||||||
if args.constructore is Function
|
if args.constructor is Function
|
||||||
args = [args]
|
args = [args]
|
||||||
if @is_synced
|
if @is_synced
|
||||||
args[0].apply this, args[1..]
|
args[0].apply this, args[1..]
|
||||||
@ -192,8 +192,10 @@ module.exports =
|
|||||||
if not @is_synced
|
if not @is_synced
|
||||||
@is_synced = true
|
@is_synced = true
|
||||||
if @compute_when_synced?
|
if @compute_when_synced?
|
||||||
for f in @compute_when_synced
|
for el in @compute_when_synced
|
||||||
f()
|
f = el[0]
|
||||||
|
args = el[1..]
|
||||||
|
f.apply(args)
|
||||||
delete @compute_when_synced
|
delete @compute_when_synced
|
||||||
null
|
null
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user