mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix DSL usage of tags
Ensure parent tags don't get modified by duplicating the hash. Force tag value to string.
This commit is contained in:
parent
dcdc64e134
commit
117ed90185
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ module Spectator::DSL
|
|||
# Any falsey items from *metadata* are removed.
|
||||
private macro _spectator_tags(name, source, *tags, **metadata)
|
||||
private def self.{{name.id}}
|
||||
%tags = {{source.id}}
|
||||
%tags = {{source.id}}.dup
|
||||
{% for k in tags %}
|
||||
%tags[{{k.id.symbolize}}] = nil
|
||||
{% end %}
|
||||
|
@ -14,7 +14,7 @@ module Spectator::DSL
|
|||
{{v}}
|
||||
end
|
||||
if %cond
|
||||
%tags[{{k.id.symbolize}}] = %cond
|
||||
%tags[{{k.id.symbolize}}] = %cond.to_s
|
||||
else
|
||||
%tags.delete({{k.id.symbolize}})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue