Skip to content

Commit

Permalink
#585 - Fix empty slugs
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed May 23, 2023
1 parent a29d2a8 commit e251a4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export const ContentTypeRelationshipField: React.FunctionComponent<IContentTypeR
});
}, [choices, crntSelected, multiSelect]);

console.log('availableChoices', availableChoices);

const showRequiredState = useMemo(() => {
return (
required && ((crntSelected instanceof Array && crntSelected.length === 0) || !crntSelected)
Expand Down
3 changes: 2 additions & 1 deletion src/services/PagesParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
Settings
} from '../helpers';
import { existsAsync } from '../utils';
import { Article } from '../commands';

export class PagesParser {
public static allPages: Page[] = [];
Expand Down Expand Up @@ -210,7 +211,7 @@ export class PagesParser {
// Make sure these are always set
title: escapedTitle,
description: escapedDescription,
slug: article?.data.slug,
slug: article?.data.slug || Article.generateSlug(escapedTitle)?.slugWithPrefixAndSuffix,
date: article?.data[dateField] || '',
draft: article?.data.draft
};
Expand Down

0 comments on commit e251a4f

Please sign in to comment.