Skip to content

Commit

Permalink
Update cms meta type
Browse files Browse the repository at this point in the history
  • Loading branch information
itzomen committed May 26, 2024
1 parent 604b0ec commit f753f52
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ yarn-error.log*

# custom
note*.txt
bun.lockb
package-lock.json
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wagtail-js",
"version": "1.1.1",
"version": "1.1.2",
"description": "Wagtail JavaScript SDK",
"author": "Peng Boris <peng@traleor.com>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const fetchContent = async (

// build the query string if queries are provided
// random ordering with offset is not supported
if (queries?.order && queries?.offset) {
if (queries?.order && queries?.order === "random" && queries?.offset) {
throw new Error(
"Random ordering with offset is not supported. Please remove either the 'order' or 'offset' query."
);
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface CMSPageMeta {
detail_url: string;
seo_title?: string;
search_description?: string;
first_published_at?: string;
}

export interface CMSMediaMeta {
Expand Down

0 comments on commit f753f52

Please sign in to comment.