mirror of
https://gitea.invidious.io/iv-org/shard-kilt.git
synced 2024-08-15 00:43:15 +00:00
Comparing ast node to nil is unnecessary
This commit is contained in:
parent
2ccb346bf4
commit
a43ad3c09c
1 changed files with 3 additions and 3 deletions
|
@ -13,10 +13,10 @@ module Kilt
|
||||||
{% ext = filename.split(".").last %}
|
{% ext = filename.split(".").last %}
|
||||||
{% ext_with_dot = ".#{ext.id}" %}
|
{% ext_with_dot = ".#{ext.id}" %}
|
||||||
|
|
||||||
{% if ::Kilt::TEMPLATES[ext_with_dot] == nil %}
|
{% if ::Kilt::TEMPLATES[ext_with_dot] %}
|
||||||
raise Kilt::Exception.new("Unsupported template type \"" + {{ext}} + "\"")
|
|
||||||
{% else %}
|
|
||||||
{{::Kilt::TEMPLATES[ext_with_dot]}}({{filename}}, {{io_name}})
|
{{::Kilt::TEMPLATES[ext_with_dot]}}({{filename}}, {{io_name}})
|
||||||
|
{% else %}
|
||||||
|
raise Kilt::Exception.new("Unsupported template type \"" + {{ext}} + "\"")
|
||||||
{% end %}
|
{% end %}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue