Skip to content

Commit 34a36db

Browse files
XhmikosRTrott
authored andcommitted
Fix watch. (#2445)
On Windows using `/` as the separator doesn't work.
1 parent 2460342 commit 34a36db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const statics = chokidar.watch(path.join(__dirname, 'static'), opts)
4141
// Gets the locale name by path.
4242
function getLocale (filePath) {
4343
const pre = path.join(__dirname, 'locale')
44-
return filePath.slice(pre.length + 1, filePath.indexOf('/', pre.length + 1))
44+
return filePath.slice(pre.length + 1, filePath.indexOf(path.sep, pre.length + 1))
4545
}
4646

4747
build.getSource((err, source) => {

0 commit comments

Comments
 (0)