Skip to content

Commit

Permalink
fix(lib): incremental counter dash replacement option
Browse files Browse the repository at this point in the history
  • Loading branch information
bossyan committed Nov 20, 2019
1 parent 1229002 commit 611710b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sequelize-slugify.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ SequelizeSlugify.prototype.slugifyModel = function (Model, slugOptions) {
*/
var addNumericSuffix = function (slugValue) {
return (function suffixHelper(slug, count) {
var suffixedSlug = slug + '-' + count;
var incrementalReplacement = slugOptions && slugOptions.slugOptions && slugOptions.slugOptions.incrementalReplacement || '-';
var suffixedSlug = slug + incrementalReplacement + count;

return checkSlug(suffixedSlug).then(function (isUnique) {
if (isUnique) {
Expand Down

0 comments on commit 611710b

Please sign in to comment.