Closed thomsbg closed 9 years ago
Can you add a test?
@devongovett I added a test by depending on the rich-text
library.
We really should not depend on rich-text
from here, even for the tests. You could just make a tiny subtype that tests just this particular behavior that you have changed.
Fixed to use a mock subtype
Looks good to me! Thanks.
@josephg can you do an npm release at some point for this? Thanks!
Would love a release of this as well. Thanks 😸
Hah its been awhile. Let me get on that
Published @1.1.0
Needed to support
rich-text
fortransform()
.rich-text
's transform function returns an object that does not pass ares.length > 0
test, and so is not appended correctly todest
.This changes the logic to only perform the
res.length > 0
test ifres
is an Array.Some failing code that is now fixed: