Browse Source

Check that the progressCallback is defined before calling it

benbro 12 years ago committed by Yury Delendik
parent
commit
ce218d021f
  1. 10
      src/api.js

10
src/api.js

@ -699,10 +699,12 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -699,10 +699,12 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('DocProgress', function transportDocProgress(data) {
this.progressCallback({
loaded: data.loaded,
total: data.total
});
if (this.progressCallback) {
this.progressCallback({
loaded: data.loaded,
total: data.total
});
}
}, this);
messageHandler.on('DocError', function transportDocError(data) {

Loading…
Cancel
Save