switch to __dirname

This commit is contained in:
butlerx 2017-06-02 11:34:35 +01:00
parent c531d96f66
commit 0c827703c1
No known key found for this signature in database
GPG Key ID: B37CA765BAA89170
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ exports.getImageMimeType = function getImageMimeType (imagePath) {
}
exports.isRevealTheme = function isRevealTheme (theme) {
if (fs.existsSync(path.join(process.cwd(), 'public', 'build', 'reveal.js', 'css', 'theme', theme + '.css'))) {
if (fs.existsSync(path.join(__dirname, '..', 'public', 'build', 'reveal.js', 'css', 'theme', theme + '.css'))) {
return theme
}
return undefined