Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
fix: the issue that the useSlugify hook may cause the value to be und…
Browse files Browse the repository at this point in the history
…efined (#884)

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

修复新建分类和标签之后再次打开表单,别名显示为 undefined 的问题。

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3382

#### Special notes for your reviewer:

测试方式:

1. 新建分类或者标签,创建完成之后再次打开创建表单,检查别名是否还为 undefined。

#### Does this PR introduce a user-facing change?

```release-note
修复 Console 端新建分类和标签之后再次打开表单,别名显示为 undefined 的问题。
```
  • Loading branch information
ruibaby authored Feb 24, 2023
1 parent a8166e5 commit 9490364
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/composables/use-slugify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default function useSlugify(
);

const handleGenerateSlug = () => {
if (!source.value) {
return;
}
target.value = slugify(source.value, {
trim: true,
});
Expand Down

1 comment on commit 9490364

@vercel
Copy link

@vercel vercel bot commented on 9490364 Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui-git-main-halo-dev.vercel.app
ui-halo-dev.vercel.app
halo-admin-ui.vercel.app

Please sign in to comment.