From a0e47a727bd170721d1fb67f2c1ba75d4aba19b9 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 21 Aug 2019 18:52:55 +0300 Subject: [PATCH] Fix watch. On Windows using `/` as the separator doesn't work. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 7b70ab4584b2c..7eaf5db3a91a4 100644 --- a/server.js +++ b/server.js @@ -41,7 +41,7 @@ const statics = chokidar.watch(path.join(__dirname, 'static'), opts) // Gets the locale name by path. function getLocale (filePath) { const pre = path.join(__dirname, 'locale') - return filePath.slice(pre.length + 1, filePath.indexOf('/', pre.length + 1)) + return filePath.slice(pre.length + 1, filePath.indexOf(path.sep, pre.length + 1)) } build.getSource((err, source) => {