From ce5568297d181535acfc37d26fc627a730ede6a1 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Sat, 3 Sep 2016 17:20:11 +0200 Subject: [PATCH] =?UTF-8?q?deps:=20update=20flow-bin=20to=20version=200.32?= =?UTF-8?q?.0=20=F0=9F=9A=80=20(#356)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update flow-bin to version 0.32.0 https://greenkeeper.io/ * chore: improve ci set up (#350) * chore: improve ci set up fix: add mssql to test-app dependencies * fix: use eol chars and reorder pgsql args * fix: cd back into the project root at the end of scripts/appveyor/before-test.ps1 * fix: disable cache for appveyor build * fix: use create/drop database instead of create/drop schema * fix: update appveyor os and platform config * fix: do not run flow on appveyor * fix: update postgres protocol in appveyor.yml * fix: postgres appveyor build * fix: run create/drop database script for mssql * fix: use different connection string for mssql * fix: use config object for database * fix: typo in test-app database config * refactor: speed up ci builds * fix: run postgres setup as batch on appveyor * fix: invalid appveyor.yml file * fix: do not test agains mssql or postgres on windows yet fix: new flow errors --- package.json | 2 +- src/packages/controller/utils/params-to-query.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4228236a..605a81dd 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "chai": "3.5.0", "documentation": "4.0.0-beta9", "eslint-plugin-flowtype": "2.11.4", - "flow-bin": "0.31.1", + "flow-bin": "0.32.0", "isomorphic-fetch": "2.2.1", "mocha": "3.0.2", "rollup-plugin-multi-entry": "2.0.1" diff --git a/src/packages/controller/utils/params-to-query.js b/src/packages/controller/utils/params-to-query.js index 251fa1ca..0ba4df96 100644 --- a/src/packages/controller/utils/params-to-query.js +++ b/src/packages/controller/utils/params-to-query.js @@ -53,9 +53,9 @@ export default function paramsToQuery(model: Model, { relationship ] = relationships.find(([, { model: related }]) => { return key === related.resourceName; - }); + }) || []; - if (!relationship) { + if (!name || !relationship) { return result; }