From 43791eac8b6d8a1f9806d141b4545ed732e6d606 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 3 Oct 2024 17:37:59 +0100 Subject: [PATCH] Explicitly return Co-authored-by: Will Tebbutt --- ext/MooncakeLogDensityProblemsADExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/MooncakeLogDensityProblemsADExt.jl b/ext/MooncakeLogDensityProblemsADExt.jl index 0ee3ef38..b4ffa988 100644 --- a/ext/MooncakeLogDensityProblemsADExt.jl +++ b/ext/MooncakeLogDensityProblemsADExt.jl @@ -61,7 +61,7 @@ end # Interop with ADTypes. function getconfig(x::ADTypes.AutoMooncake) c = x.config - isnothing(c) ? Mooncake.DEFAULT_CONFIG : c + return isnothing(c) ? Mooncake.DEFAULT_CONFIG : c end function ADgradient(x::ADTypes.AutoMooncake, ℓ) debug_mode = getconfig(x).debug_mode