Skip to content

Commit

Permalink
Update backbone-javascript-client.md
Browse files Browse the repository at this point in the history
Fixing syntax errors, calling CustomPosts constructor and fixing fetch callback.
  • Loading branch information
alpual committed Mar 15, 2019
1 parent 0d7240e commit 48c660a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions using-the-rest-api/backbone-javascript-client.md
Expand Up @@ -255,8 +255,8 @@ const CustomPosts = wp.api.collections.Posts.extend( {
url: wpApiSettings.root + 'wp/v2/custom_post_slug',
model: BLProduct,
} );
const someCustomPosts = new CustomPosts;
someCustomPosts.fetch().then( ( posts ) ) => {
const someCustomPosts = new CustomPosts();
someCustomPosts.fetch().then( ( posts ) => {
// do something with the custom posts
}
} );
```

0 comments on commit 48c660a

Please sign in to comment.