Skip to content

Commit 5230c3d

Browse files
dwickernTurbo87
authored andcommitted
Fix NPE after upgrading to 2018.2 (#196)
1 parent 7fad3b7 commit 5230c3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/emberjs/utils/VirtualFileExtensions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ val VirtualFile.isEmberFolder: Boolean
2424

2525
val VirtualFile.isInRepoAddon: Boolean
2626
get() = findFileByRelativePath("package.json") != null &&
27-
parent.name == "lib" &&
28-
parent.parent.isEmberFolder
27+
parent?.name == "lib" &&
28+
parent?.parent?.isEmberFolder == true
2929

3030
/**
3131
* Searches all parent paths until it finds a path containing a `package.json` file.

0 commit comments

Comments
 (0)