From 4b65c9f02e6bc6e289ac7c660c20232bbb3fff00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 4 Sep 2024 10:57:12 +0200 Subject: Node : rewrite static_path logic --- lib/zorglub/node.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 335aa68..a6159c3 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -286,11 +286,10 @@ module Zorglub self.class.call_before_hooks self unless no_hooks @state = :meth @content = send @meth, *@args - static_path = static - if static_path.nil? - compile_page! - else + if (static_path = static) static_page! static_path + else + compile_page! end @state = :post_cb self.class.call_after_hooks self unless no_hooks -- cgit v1.1-2-g2b99