diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-11 18:02:11 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-11 18:02:11 +0700 |
| commit | 8ee5432961a5b73e8e5c42af2eda05621723c9e7 (patch) | |
| tree | 12b7e0628328f6f10f03b464ad0717a729e2ede0 /src/helpers/slug.js | |
| parent | df04a3504e61f3c1257b5a46310e39c51bf23bea (diff) | |
Connect to solr (search product), header component with title, fix product card layout, show product search result
Diffstat (limited to 'src/helpers/slug.js')
| -rw-r--r-- | src/helpers/slug.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/slug.js b/src/helpers/slug.js index 5a8db08f..ed1a5b6a 100644 --- a/src/helpers/slug.js +++ b/src/helpers/slug.js @@ -1,5 +1,5 @@ const createSlug = (name, id) => { - return name.trim().replace(new RegExp(/[^A-Za-z0-9]/, 'g'), '-').toLowerCase() + '-' + id; + return name?.trim().replace(new RegExp(/[^A-Za-z0-9]/, 'g'), '-').toLowerCase() + '-' + id; } const getId = (slug) => { |
