talha-asad / mongoose-url-slugs

Create URL compatiable slugs on mongoose models, ensuring uniqueness.
MIT License
40 stars 22 forks source link

recursively find slug root #4

Closed phillee closed 9 years ago

phillee commented 9 years ago

Also, when index_sparse is set to true, when the slug is an empty string we don't set it.

phillee commented 9 years ago

Fixed this with a recursive call to ensureUniqueSlug, pull request: https://github.com/mindblaze/mongoose-url-slugs/pull/4

talha-asad commented 9 years ago

I have done this another way, can you check this in the latest version.