strapi-community / strapi-plugin-slugify

A plugin for Strapi Headless CMS that provides the ability to auto slugify a field for any content type.
https://market.strapi.io/plugins/strapi-plugin-slugify
MIT License
45 stars 21 forks source link

fix(slugification): add number support #54

Closed kibblerz closed 1 year ago

kibblerz commented 2 years ago

Adding support for numbers in the slug. It's a simple change, but quite useful to be able to use numbers in the slug fields.

ComfortablyCoding commented 2 years ago

Can you explain further what this should be accomplishing? Using a number field as a reference should already be supported.

kibblerz commented 2 years ago

It does not, the slug ends up empty, or the reference field is skipped if skipUndefinedReferences is enabled. Numbers do not have a length property, so it is seen as undefined.

ComfortablyCoding commented 2 years ago

Alright, makes sense. Thanks for catching and reporting it. Will review it over the weekend.

ComfortablyCoding commented 2 years ago

@kibblerz ,

Please resolve the suggested change and remove the changes to lines 36 & 38. Once completed I will merge.

ComfortablyCoding commented 1 year ago

Closing as this will be fixed by #78