mirror of
https://github.com/usememos/memos.git
synced 2025-03-06 02:23:29 +08:00
chore: use undefined
instead of UNKNOWN_ID
This commit is contained in:
parent
2fe2b82809
commit
5dd6d505cc
3 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,7 @@ const Memo: React.FC<Props> = (props: Props) => {
|
|||
const tagName = targetEl.innerText.slice(1);
|
||||
const currTagQuery = locationService.getState().query?.tag;
|
||||
if (currTagQuery === tagName) {
|
||||
locationService.setTagQuery("");
|
||||
locationService.setTagQuery(undefined);
|
||||
} else {
|
||||
locationService.setTagQuery(tagName);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
|
|||
|
||||
const handleShortcutClick = () => {
|
||||
if (isActive) {
|
||||
locationService.setMemoShortcut(UNKNOWN_ID);
|
||||
locationService.setMemoShortcut(undefined);
|
||||
} else {
|
||||
if (!["/"].includes(locationService.getState().pathname)) {
|
||||
locationService.setPathname("/");
|
||||
|
|
|
@ -94,7 +94,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain
|
|||
|
||||
const handleTagClick = () => {
|
||||
if (isActive) {
|
||||
locationService.setTagQuery("");
|
||||
locationService.setTagQuery(undefined);
|
||||
} else {
|
||||
utils.copyTextToClipboard(`#${tag.text} `);
|
||||
if (!["/"].includes(locationService.getState().pathname)) {
|
||||
|
|
Loading…
Reference in a new issue