fix(less): fix themes not loading properly from cache

This commit is contained in:
Evan Morikawa 2016-05-02 18:28:46 -07:00
parent 6cf4f8edcd
commit f5c40c6f99

View file

@ -30,10 +30,9 @@ class LessCompileCache
# from our backend FileListCache.
setImportPaths: (importPaths=[]) ->
fileCache = NylasEnv.fileListCache()
fileCacheImportPaths ?= fileCache.lessCacheImportPaths ? []
fileCacheImportPaths = fileCache.lessCacheImportPaths ? []
fullImportPaths = importPaths.concat(@lessSearchPaths)
pathDiff = _.difference(fullImportPaths, fileCacheImportPaths)
if pathDiff.length isnt 0
if not _.isEqual(fullImportPaths, fileCacheImportPaths)
@cache.setImportPaths(fullImportPaths)
fileCache.lessCacheImportPaths = fullImportPaths