Skip to content

Commit

Permalink
chore: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Jan 17, 2023
1 parent 7211492 commit b4750ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/composables/utils.ts
Expand Up @@ -52,7 +52,7 @@ export const shouldUseClientDB = () => {
if (Object.prototype.hasOwnProperty.call(query, 'preview') && !query.preview) {
return false
}
// Disable clientDB when preview mode is disabled
// Enable clientDB when preview mode is enabled
if (query.preview || useCookie('previewToken').value) {
return true
}
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/utils/query.ts
Expand Up @@ -21,7 +21,7 @@ export const encodeQueryParams = (params: QueryBuilderParams) => {
return chunks.join('/')
}

export const decodeQuryParams = (encoded: string) => {
export const decodeQueryParams = (encoded: string) => {
// remove chunks
encoded = encoded.replace(/\//g, '')

Expand All @@ -36,7 +36,7 @@ const memory: Record<string, QueryBuilderParams> = {}
export const getContentQuery = (event: H3Event): QueryBuilderParams => {
const { params } = event.context.params || {}
if (params) {
return decodeQuryParams(params.replace(/.json$/, ''))
return decodeQueryParams(params.replace(/.json$/, ''))
}

const qid = event.context.params.qid?.replace(/.json$/, '')
Expand Down

0 comments on commit b4750ed

Please sign in to comment.