From f5c40c6f993355656dc6d1b3737e6e3e9604a4ad Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Mon, 2 May 2016 18:28:46 -0700 Subject: [PATCH] fix(less): fix themes not loading properly from cache --- src/less-compile-cache.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/less-compile-cache.coffee b/src/less-compile-cache.coffee index 16b3d5894..6bf2d8c45 100644 --- a/src/less-compile-cache.coffee +++ b/src/less-compile-cache.coffee @@ -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