diff --git a/docs/3.x.x/getting-started/quick-start.md b/docs/3.x.x/getting-started/quick-start.md index a37fb05454..e475365988 100644 --- a/docs/3.x.x/getting-started/quick-start.md +++ b/docs/3.x.x/getting-started/quick-start.md @@ -1,6 +1,6 @@ # Quick start -This section explains how to handle Strapi for the first time, ([check out our tutorial video](https://www.youtube.com/watch?v=yMl5IcFHA74)). +This section explains how to handle Strapi for the first time, ([check out our video tutorial](https://www.youtube.com/watch?v=yMl5IcFHA74)). **Table of contents:** - [1. Create your first project](#_1-create-a-project) @@ -170,7 +170,7 @@ axios If you want to get a specific entry, add the `id` of the wanted post at the end of the url. -Examble with Axios: +Example with Axios: ```js import axios from 'axios'; @@ -194,7 +194,7 @@ axios Use the `POST` route to create a new entry. -Examble with Axios: +Example with Axios: ```js import axios from 'axios'; @@ -221,7 +221,7 @@ axios Use the `PUT` route to update an existing entry. -Examble with Axios: +Example with Axios: ```js import axios from 'axios'; @@ -250,7 +250,7 @@ axios Use the `DELETE` route to delete an existing entry. -Examble with Axios: +Example with Axios: ```js import axios from 'axios'; diff --git a/packages/strapi-hook-bookshelf/lib/relations.js b/packages/strapi-hook-bookshelf/lib/relations.js index 0b8695510c..f97818cdf4 100644 --- a/packages/strapi-hook-bookshelf/lib/relations.js +++ b/packages/strapi-hook-bookshelf/lib/relations.js @@ -53,10 +53,22 @@ module.exports = { if (!association) { const fieldKey = `${strapiModel.collectionName}.${key}`; if (_.isArray(value.value) && value.symbol !== 'IN') { - for (const value in value.value) { + for (let value in value.value) { + if (typeof value === 'string') { + value = { + value, + symbol: '=' + }; + } qb[value ? 'where' : 'orWhere'](fieldKey, value.symbol, value.value[value]); } } else { + if (typeof value === 'string') { + value = { + value, + symbol: '=' + }; + } qb.where(fieldKey, value.symbol, value.value); } } else {