Skip to content

Commit

Permalink
Fixed a bug saying that the callback is not a function when calling t…
Browse files Browse the repository at this point in the history
…he 'readDir' method of a file system
  • Loading branch information
AdrienCastex committed Jul 13, 2017
1 parent 4522925 commit 57056d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/manager/v2/fileSystem/FileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ var FileSystem = (function () {
var pPath = new Path_1.Path(path);
var callback = function (e, data) {
if (e)
return _callback(e);
return __callback(e);
if (!data)
data = [];
_this.getFullPath(ctx, function (e, fsFullPath) {
Expand Down
2 changes: 1 addition & 1 deletion src/manager/v2/fileSystem/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ export abstract class FileSystem implements ISerializableFileSystem
const pPath = new Path(path);
const callback = (e ?: Error, data ?: Path[]) => {
if(e)
return _callback(e);
return __callback(e);
if(!data)
data = [];

Expand Down

0 comments on commit 57056d0

Please sign in to comment.