diff --git a/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/npm/NpmIndexTask.kt b/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/npm/NpmIndexTask.kt index 3bf3b79..6999df4 100644 --- a/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/npm/NpmIndexTask.kt +++ b/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/npm/NpmIndexTask.kt @@ -63,6 +63,7 @@ open class NpmIndexTask : DefaultTask() { } private fun packageJsonContainsTypes(file: File): Boolean { + if (file.length == 0) return false val parsedFile = JsonSlurper().parse(file) return (parsedFile is Map<*, *> && parsedFile["typings"] != null) } @@ -81,4 +82,4 @@ open class NpmIndexTask : DefaultTask() { return true } -} \ No newline at end of file +}