Skip to content

Commit

Permalink
Refactor fileIndexes init in ProjectService (#3854)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfhbd committed Jan 25, 2023
1 parent a4ed59b commit 8170fa1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ class ProjectService(val project: Project) : SqlDelightProjectService, Disposabl
Timber.plant(loggingTree)

val path = Path.of(project.basePath!!)
if (ProjectUtil.isValidProjectPath(path)) {
fileIndexes = FileIndexMap()
fileIndexes = if (ProjectUtil.isValidProjectPath(path)) {
FileIndexMap()
} else {
// A gradle sync is needed before the file index map initializes.
fileIndexes = null
null
}

if (!ApplicationManager.getApplication().isUnitTestMode) {
Expand Down

0 comments on commit 8170fa1

Please sign in to comment.