From 1d7aeca696be873dfaf88eaa6d312949a3b8572b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 13 Sep 2023 03:06:19 +0200 Subject: [PATCH] fix: Run code-block if `executablePatches` does not yet contain `patch` --- .../src/main/kotlin/app/revanced/patcher/Patcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt b/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt index bdc398f..e2979fe 100644 --- a/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -74,7 +74,7 @@ class Patcher( } // Add all patches and their dependencies to the context. - for (patch in patches) context.executablePatches.putIfAbsent(patch::class, patch) ?: { + for (patch in patches) context.executablePatches.putIfAbsent(patch::class, patch) ?: run { context.allPatches[patch::class] = patch patch.dependencies?.forEach { it.putDependenciesRecursively() }