Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix(theme): 502 on composition-api error (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkucmus authored Mar 10, 2020
1 parent c6510a7 commit 2e99da6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ install:
- yarn

jobs:
allow_failures:
- os: windows
include:
- stage: Test
script:
Expand Down
5 changes: 1 addition & 4 deletions packages/composables/src/hooks/useProductListing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,11 @@ const selectedCriteria = Vue.observable({
export const useProductListing = (
initialProducts: Product[] = []
): UseProductListing => {
const { page } = useCms();
const { categoryId } = useCms();
const { activeSorting } = useCategoryFilters();

const loading: Ref<boolean> = ref(false);
const error: Ref<any> = ref(null);
const categoryId: Ref<string> = ref(
page && page.value && page.value.resourceIdentifier
);
const localListing = reactive(sharedListing);
const localCriteria = reactive(selectedCriteria);
const localPagination = reactive(sharedPagination);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
setup() {
const { categoryId } = useCms()
return { categoryId: categoryId.value }
return { categoryId }
},
data() {
return {
Expand Down
5 changes: 2 additions & 3 deletions packages/default-theme/pages/_.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
components: {
},
asyncData: async ({ req, params, query, error: errorView }) => {
const {search, page, category, error} = useCms()
const {search, page, error} = useCms()
const {refreshCart} = useCart()
const {refreshUser} = useUser()
// TODO fix this after meeting
Expand All @@ -49,8 +49,7 @@ export default {
cmsPageName: name,
page: unwrappedPage,
breadcrumbs,
cmsPage,
category
cmsPage
}
},
data() {
Expand Down

0 comments on commit 2e99da6

Please sign in to comment.