mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix '<anonymous>' showing up for root group
This commit is contained in:
parent
84ac41967b
commit
aee171656a
1 changed files with 10 additions and 11 deletions
|
@ -121,11 +121,11 @@ module Spectator
|
||||||
# Constructs the full name or description of the example group.
|
# Constructs the full name or description of the example group.
|
||||||
# This prepends names of groups this group is part of.
|
# This prepends names of groups this group is part of.
|
||||||
def to_s(io)
|
def to_s(io)
|
||||||
name = @name
|
|
||||||
|
|
||||||
# Prefix with group's full name if the node belongs to a group.
|
# Prefix with group's full name if the node belongs to a group.
|
||||||
if (parent = @group)
|
return unless parent = @group
|
||||||
|
|
||||||
parent.to_s(io)
|
parent.to_s(io)
|
||||||
|
name = @name
|
||||||
|
|
||||||
# Add padding between the node names
|
# Add padding between the node names
|
||||||
# only if the names don't appear to be symbolic.
|
# only if the names don't appear to be symbolic.
|
||||||
|
@ -133,7 +133,6 @@ module Spectator
|
||||||
io << ' ' unless !parent.name? || # ameba:disable Style/NegatedConditionsInUnless
|
io << ' ' unless !parent.name? || # ameba:disable Style/NegatedConditionsInUnless
|
||||||
(parent.name?.is_a?(Symbol) && name.is_a?(String) &&
|
(parent.name?.is_a?(Symbol) && name.is_a?(String) &&
|
||||||
(name.starts_with?('#') || name.starts_with?('.')))
|
(name.starts_with?('#') || name.starts_with?('.')))
|
||||||
end
|
|
||||||
|
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue