Skip to content

Commit

Permalink
Fix for working in web workers.
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgeek committed Oct 19, 2011
1 parent d9249da commit 129c86c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jdataview.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ for (var type in dataTypes) {
// ArrayBuffer: we use a typed array of size 1 if the alignment is good
// ArrayBuffer does not support endianess flag (for size > 1)
else if (this._isArrayBuffer && byteOffset % size == 0 && (size == 1 || littleEndian)) {
value = new window[type + 'Array'](this._buffer, byteOffset, 1)[0];
value = new self[type + 'Array'](this._buffer, byteOffset, 1)[0];
}
else {
// Error Checking
Expand All @@ -317,6 +317,6 @@ for (var type in dataTypes) {
})(type);
}

window.jDataView = jDataView;
self.jDataView = jDataView;

})();

0 comments on commit 129c86c

Please sign in to comment.