Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rename forgotten changed variable name #9

Merged
merged 1 commit into from

3 participants

@mattiasw

When using ArrayBuffer, the "all" variable should be changed to "global". I guess it was forgotten in the "One-line export" commit: 9ae7371

@vjeux vjeux merged commit 727f8ad into jDataView:master
@vjeux
Owner

Thanks! My bad :x

@Mithgol

That can't be global, because global is the Node's name of the global object, but ArrayBuffers are supported in browsers, not in Node.js, at least currently.

I believe all here is that damned Microsoft's shortcut for window, originating from old Internet Explorers. See MSDN for details.

I've made a pull request (jDataView/jDataView#17) to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 31, 2011
  1. @mattiasw
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/jdataview.js
View
2  src/jdataview.js
@@ -315,7 +315,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 && (this._start + byteOffset) % size === 0 && (size === 1 || littleEndian)) {
- value = new all[type + 'Array'](this.buffer, this._start + byteOffset, 1)[0];
+ value = new global[type + 'Array'](this.buffer, this._start + byteOffset, 1)[0];
}
// NodeJS Buffer
else if (this._isNodeBuffer && compatibility.NodeBufferFull) {
Something went wrong with that request. Please try again.