Verified Commit 247f1009 authored by Aral Balkan's avatar Aral Balkan
Browse files

Special case production environment on cache calculation

This is because of a difference in directory nesting level between development and production.
parent 610916a5
......@@ -390,8 +390,13 @@ class Blockdown
if @useContentCache
parsedFilePath = (path.parse file)
filePathKey = path.join parsedFilePath.dir.split('/')[5..].join('/'), parsedFilePath.base
# console.log(parsedFilePath)
indexToStartFrom = if app.isRunningInProduction then 4 else 5
filePathKey = path.join parsedFilePath.dir.split('/')[indexToStartFrom..].join('/'), parsedFilePath.base
# "File path key: #{filePathKey}"
# "Current: #{@contentCurrentModifiedTimes[filePathKey]}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment