Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
fix codacy hint
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-zone committed May 30, 2017
1 parent 228b515 commit 833cf1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/MemoryFileSystemError.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class MemoryFileSystemError extends Error {
}
findOperation() {
if(!this.stack) return null;
var stacks = this.stack.split(/[\r\n|\n][\s]*/), findDepth = 1, operation;
var stacks = this.stack.split(/[\r\n|\n][\s]*/);
var operation;
var findDepth = 1;
while(!operation && findDepth < stacks.length) {
var stack = stacks[findDepth];
var operationMatch = stack.match(operationMatchReg);
Expand Down
4 changes: 2 additions & 2 deletions test/MemoryFileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ describe("files", function() {
});
});
describe("errors", function() {
var catchError = function(fn) {
function catchError(fn) {
try {
fn();
} catch(e) {
return e;
}
return null;
};
}

it("should fail on invalid paths", function() {
var fs = new MemoryFileSystem();
Expand Down

0 comments on commit 833cf1d

Please sign in to comment.