diff --git a/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt b/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt index 6a6eeba7b932..ab632f223483 100644 --- a/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt +++ b/packages/gradle-plugin/shared/src/main/kotlin/com/facebook/react/utils/JsonUtils.kt @@ -23,21 +23,21 @@ object JsonUtils { fun fromAutolinkingConfigJson(input: File): ModelAutolinkingConfigJson? = input.bufferedReader().use { reader -> runCatching { - // We sanitize the output of the `config` command as it could contain debug logs - // such as: - // - // > AwesomeProject@0.0.1 npx - // > rnc-cli config - // - // which will render the JSON invalid. - val content = - reader - .readLines() - .filterNot { line -> line.startsWith(">") } - .joinToString("\n") - .trim() - gsonConverter.fromJson(content, ModelAutolinkingConfigJson::class.java) - } + // We sanitize the output of the `config` command as it could contain debug logs + // such as: + // + // > AwesomeProject@0.0.1 npx + // > rnc-cli config + // + // which will render the JSON invalid. + val content = + reader + .readLines() + .filterNot { line -> line.startsWith(">") } + .joinToString("\n") + .trim() + gsonConverter.fromJson(content, ModelAutolinkingConfigJson::class.java) + } .getOrNull() } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt index 984ff9e75074..72257c165077 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt @@ -412,10 +412,10 @@ internal class MountItemDispatcher( } return buildList { - do { - queue.poll()?.let { add(it) } - } while (queue.isNotEmpty()) - } + do { + queue.poll()?.let { add(it) } + } while (queue.isNotEmpty()) + } .takeIf { it.isNotEmpty() } }