17,230
edits
m (remove whitespace in content selection) |
(I knew the logic was bad but not that bad. breaking it into two ifs for clarity) |
||
(One intermediate revision by the same user not shown) | |||
Line 91: | Line 91: | ||
for _, c in ipairs( self.contents ) do | for _, c in ipairs( self.contents ) do | ||
if self.tabsLeft and self.tabsLeft.defaultSelection == c.selection | if type( c.selection ) == 'string' | ||
and (self.tabsLeft and self.tabsLeft.defaultSelection == c.selection:gsub( "%s", "" ) | |||
or self.tabsTop and self.tabsTop.defaultSelection == c.selection:gsub( "%s", "" )) then | |||
and self.tabsLeft and self.tabsLeft.defaultSelection == c.selection.left | c.default = true | ||
and self.tabsTop and self.tabsTop.defaultSelection == c.selection.top then | elseif type( c.selection ) == 'table' | ||
and self.tabsLeft and self.tabsLeft.defaultSelection == c.selection.left:gsub( "%s", "" ) | |||
and self.tabsTop and self.tabsTop.defaultSelection == c.selection.top:gsub( "%s", "" ) then | |||
c.default = true | c.default = true | ||
end | end |