Skip to content

Commit

Permalink
Fixing a bug in Buffer => Arrayish conversions.
Browse files Browse the repository at this point in the history
I do not understand why I wrote that conditional in the first place.
  • Loading branch information
John Vilk committed Nov 13, 2015
1 parent d000e8d commit 7fa53c8
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BrowserFS v0.5.6
# BrowserFS v0.5.7
> BrowserFS is an in-browser file system that emulates the [Node JS file system API](http://nodejs.org/api/fs.html) and supports storing and retrieving files from various backends. BrowserFS also integrates nicely into the Emscripten file system.
[![NPM version](https://badge.fury.io/js/browserfs.svg)](http://badge.fury.io/js/browserfs)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BrowserFS",
"version": "0.5.6",
"version": "0.5.7",
"main": [
"./dist/browserfs.min.js",
"./dist/browserfs.min.js.map"
Expand Down
2 changes: 1 addition & 1 deletion dist/browserfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12376,7 +12376,7 @@ function buffer2Uint8array(buff) {
}
exports.buffer2Uint8array = buffer2Uint8array;
function buffer2Arrayish(buff) {
if (buff.length === 0 || typeof (buff[0]) === 'number') {
if (typeof (buff[0]) === 'number') {
return buff;
}
else if (typeof (ArrayBuffer) !== 'undefined') {
Expand Down
4 changes: 2 additions & 2 deletions dist/browserfs.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/browserfs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/browserfs.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/node/core/util.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browserfs",
"version": "0.5.6",
"version": "0.5.7",
"description": "A filesystem in your browser!",
"main": "dist/browserfs.js",
"typings": "dist/node/main",
Expand Down
2 changes: 1 addition & 1 deletion src/core/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function buffer2Uint8array(buff: Buffer): Uint8Array {
* Required for BrowserFS buffers, which do not support indexing.
*/
export function buffer2Arrayish(buff: Buffer): Arrayish<number> {
if (buff.length === 0 || typeof(buff[0]) === 'number') {
if (typeof(buff[0]) === 'number') {
return buff;
} else if (typeof(ArrayBuffer) !== 'undefined') {
return buffer2Uint8array(buff);
Expand Down

0 comments on commit 7fa53c8

Please sign in to comment.