hyperjson.js : used split instead of filter... oops

This commit is contained in:
ansuz 2016-03-23 12:31:16 +01:00
parent b2753ef7b7
commit 1bd5cb9e27
1 changed files with 2 additions and 1 deletions

View File

@ -84,9 +84,10 @@ define([], function () {
/* TODO this can be done with RegExps alone, and it will be faster
but this works and is a little less error prone, albeit slower
come back and speed it up when it comes time to optimize */
sel = sel + attributes.class
.split(/\s+/)
.split(isTruthy)
.filter(isTruthy)
.map(prependDot)
.join('');
delete attributes.class;