Skip to content

Commit

Permalink
fix: add support for Ember 3.23.0 (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
buschtoens authored Nov 16, 2020
1 parent a88f7bb commit 2a790ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions addon/helpers/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ export default class LinkHelper extends Helper {
Boolean(positional[0] || named.route)
);

const positionalQueryParameters = isQueryParams(
positional[positional.length - 1]
)
? (positional[positional.length - 1] as QueryParams)
: undefined;
const positionalQueryParameters =
positional.length > 0 && isQueryParams(positional[positional.length - 1])
? (positional[positional.length - 1] as QueryParams)
: undefined;

assert(
`Query parameters either need to be specified as the last positional parameter or as the named 'query' parameter.`,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"ember-on-modifier": "^1.0.1",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.2",
"ember-source": "~3.21.1",
"ember-source": "~3.23.0-beta.5",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^2.13.0",
"ember-try": "^1.4.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6886,10 +6886,10 @@ ember-source-channel-url@^3.0.0:
dependencies:
node-fetch "^2.6.0"

ember-source@~3.21.1:
version "3.21.1"
resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.21.1.tgz#e1bfb20a3db91c21415256e5949a32085a2c23ab"
integrity sha512-zG3FCd++91/OQgYeMeGJequ1u0uLFK3xeilHYL4CNrwgQAit0vju/s8x7H4fVnVxOxYhsFUXAsTMSsvgqbaqpQ==
ember-source@~3.23.0-beta.5:
version "3.23.0-beta.5"
resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.23.0-beta.5.tgz#bd729fdc924d7721bcee311d0060c14f03622366"
integrity sha512-UJ96yV23gOOjt/9JWd+7/SuoA6m80IaWhgbs9aOrXJeswOfS5gcj/LanENBa1yD5zxSKm7SGAxFVIlyk1gd35g==
dependencies:
"@babel/helper-module-imports" "^7.8.3"
"@babel/plugin-transform-block-scoping" "^7.8.3"
Expand Down

0 comments on commit 2a790ef

Please sign in to comment.