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

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