fixed subtle bug (fun.apply vs fun.call) in sync. popcorn-port
authorhamidouk
Thu, 03 Nov 2011 16:04:04 +0100
branchpopcorn-port
changeset 184 a4be54204b71
parent 183 d471599e1b2c
child 185 2ccec6201261
fixed subtle bug (fun.apply vs fun.call) in sync.
src/js/data.js
--- a/src/js/data.js	Thu Nov 03 16:03:39 2011 +0100
+++ b/src/js/data.js	Thu Nov 03 16:04:04 2011 +0100
@@ -26,6 +26,7 @@
 IriSP.Serializer = function(DataLoader, url) {
   this._DataLoader = DataLoader;
   this._url = url;
+  this._data = [];
 };
 
 IriSP.Serializer.prototype.serialize = function(data) { };
@@ -35,7 +36,7 @@
 };
 
 IriSP.Serializer.prototype.sync = function(callback) {  
-  callback.apply(this, []);  
+  callback.call(this, this._data);  
 };
 
 IriSP.SerializerFactory = function(DataLoader) {