Skip to content

Commit

Permalink
fix: fix URL checking #2
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Nov 17, 2017
1 parent e8c7351 commit a5ac065
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkfs",
"version": "2.0.1",
"version": "2.0.2",
"description": "Rewrites filesystem paths",
"main": "lib/index.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function link(fs, rewrites: string[] | string[][]): any {

// If first argument is not a path, just proxy the function.
if((typeof path !== 'string') && !Buffer.isBuffer(path)) {
if(!require('url') || !(path instanceof require('url').URL))
if(!require('url').URL || !(path instanceof require('url').URL))
return func.apply(fs, args);
}

Expand Down

0 comments on commit a5ac065

Please sign in to comment.