Fix leading whitespace with root group

This commit is contained in:
Michael Miller 2020-09-12 18:35:31 -06:00
parent 98f886d9d4
commit 0190cc7260
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -54,8 +54,9 @@ module Spectator
# Add padding between the node names
# only if the names don't appear to be symbolic.
io << ' ' unless group.name.is_a?(Symbol) && name.is_a?(String) &&
(name.starts_with?('#') || name.starts_with?('.'))
io << ' ' unless !group.name? || # Skip blank group names (like the root group).
(group.name?.is_a?(Symbol) && name.is_a?(String) &&
(name.starts_with?('#') || name.starts_with?('.')))
end
io << name