Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'url' of undefined #57

Open
erdemalkan opened this issue Aug 18, 2019 · 0 comments
Open

TypeError: Cannot read property 'url' of undefined #57

erdemalkan opened this issue Aug 18, 2019 · 0 comments

Comments

@erdemalkan
Copy link

In the list pages, the description images come as files. Therefore, I think that "url" in the relevant lines in api.js file should be changed to "uri".

Application fails because "url" cannot be found.

lib/api.js

diff --git a/lib/api.js b/lib/api.js
index 9a3b9a6..034a62b 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -38,7 +38,7 @@ export function findAllPromotedRecipes(limit = 4) {
fields: {
recipes: 'title,difficulty,image',
images: 'name,thumbnail',

  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    sort: '-created',
    };
    @@ -64,7 +64,7 @@ export function findAllLatestRecipes(limit = 4, offset = 0) {
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    };
    return jsonApi.get('recipes', query);
    @@ -89,7 +89,7 @@ export function findHomePromotedArticlesAndRecipes(limit) {
    fields: {
    recipes: 'contentType,title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
     contentTypes: 'type',
    
    },
    sort: '-created',
    @@ -112,7 +112,7 @@ export function findHomePromotedArticlesAndRecipes(limit) {
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
     contentTypes: 'type',
    
    },
    sort: '-created',
    @@ -146,7 +146,7 @@ export function findAllRecipesByCategoryName(
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    page: {
    offset: 0,
    @@ -173,7 +173,7 @@ export function findAllRecipesByDifficultyName(
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    page: {
    offset: 0,
    @@ -203,7 +203,7 @@ export function findAllRecipesByMaxTotalTime(
    fields: {
    recipes: 'title,difficulty,image',
    images: 'name,thumbnail',
  •  files: 'filename,url',
    
  •  files: 'filename,uri',
    
    },
    page: {
    offset: 0,
marcvangend added a commit to marcvangend/contenta_vue_nuxt that referenced this issue Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant