Skip to content

Commit

Permalink
fix(regex): use plain regex over path.sep
Browse files Browse the repository at this point in the history
path.sep generates invalid regex on windows
  • Loading branch information
thetutlage committed Jan 30, 2017
1 parent 0d84619 commit db3e2dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Youch/index.js
Expand Up @@ -14,7 +14,7 @@ const path = require('path')
const stackTrace = require('stack-trace')
const fs = require('fs')
const VIEW_PATH = '../resources/error.mustache'
const startingSlashRegex = new RegExp(`^${path.sep}`)
const startingSlashRegex = /\\|\//

const viewTemplate = fs.readFileSync(path.join(__dirname, VIEW_PATH), 'utf-8')

Expand Down

0 comments on commit db3e2dc

Please sign in to comment.