Skip to content

Commit

Permalink
fix: fix errors caused by empty class names getting applied to Surfac…
Browse files Browse the repository at this point in the history
…es via
  • Loading branch information
zackbrown committed Jul 24, 2014
1 parent 5e774ce commit 4054c44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/famous-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,10 @@ angular.module('famous.angular')
angular.element.prototype[classManipulator] = function(className) {
originalManipulator.apply(this, arguments);

// If and only if the current element represents a Famo.us Surface, pass through
// If and only if the current element represents a Famo.us Surface,
// AND the class is not an empty string, pass through
// the addClass and removeClass methods to the underlying renderNode.
if (isClassable(this)) {
if (isClassable(this) && typeof className === 'string' && className.trim() !== '') {
$famous.getIsolate(this.scope()).renderNode[classManipulator](className);
}
};
Expand Down
Loading

0 comments on commit 4054c44

Please sign in to comment.