Skip to content

Commit

Permalink
Log if trying to add a CSS class twice to an element during debug bui…
Browse files Browse the repository at this point in the history
…lds.
  • Loading branch information
mikeabdullah committed Jul 28, 2011
1 parent d7376e3 commit 98928dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions KSHTMLWriter.m
Expand Up @@ -119,6 +119,13 @@ - (NSString *)currentElementClassName;


- (void)pushClassName:(NSString *)className; - (void)pushClassName:(NSString *)className;
{ {
#ifdef DEBUG
if ([_classNames containsObject:className])
{
NSLog(@"Adding class \"%@\" to an element twice", className);
}
#endif

[_classNames addObject:className]; [_classNames addObject:className];
} }


Expand Down

0 comments on commit 98928dc

Please sign in to comment.