fix: types error

This commit is contained in:
DIYgod 2023-08-04 23:33:12 +01:00
parent 57446671b7
commit df3ae65561
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ export async function postNotes(
const getLocalPages = (input: {
characterId: number
isPost?: boolean // In order to be compatible with old drafts
type?: NoteType
type?: NoteType[]
handle?: string
}) => {
const pages: ExpandedNote[] = []
@ -76,7 +76,7 @@ const getLocalPages = (input: {
const page = getStorage(key)
if (
page.isPost === input.isPost ||
page.type === input.type ||
input.type?.includes(page.type) ||
input.type === undefined
) {
const note: ExpandedNote = {
@ -341,7 +341,7 @@ export async function getPagesBySite(input: {
const local = getLocalPages({
characterId: input.characterId,
isPost: input.type === "post", // In order to be compatible with old drafts
isPost: input.type[0] === "post", // In order to be compatible with old drafts
type: input.type,
handle: input.handle,
})