question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

queryParams array attribute becomes a string if other attribute changes before model is resolved

See original GitHub issue

See this twiddle please.

There are two queryParams:

  • categories array
  • searchQuery string

The model resolves the current time with a 1-second timeout.

Steps:

  1. Open the console and see the current value of categories.
  2. Add at least one category by hitting the “Add category” button (do not enter anything into the text input on this stage).
  3. Observe categories is still an array in the console.
  4. Enter any text into the input field.
  5. If the searchQuery is modified before the transition completes, the categories becomes a string. From this point, it becomes even worse with every modification because it escapes escape symbols on every iteration.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sly7-7commented, Mar 6, 2021

@rwjblue I’ve reproduced your twiddle in https://github.com/sly7-7/ember-repro-15611 (ember 3.25.1), and it looks like this is fixed. So I guess this could be closed, and #19145 maybe not necessary

0reactions
rwjbluecommented, Mar 7, 2021

Thanks @sly7-7!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Query Parameters - Routing - Ember Guides
parse . When a controller's query param property is currently set to its default value, this value won't be serialized into the URL....
Read more >
Array support in querystring validation #2841 - fastify ... - GitHub
Using a schema involving type: "array" for querystring currently doesn't work properly. The only solution I have found so far is to not...
Read more >
Query-string encoding of a JavaScript object - Stack Overflow
This only works on shallow objects. If you have a top-level property that is another object, this one liner will output "key=%5Bobject%20Object% ...
Read more >
http_build_query - Manual - PHP
Generates a URL-encoded query string from the associative (or indexed) array provided. Parameters ¶. data. May be an array or object containing properties....
Read more >
how to get values for array list and record field from property
Solved : Hi Team, we are having a custom scripted get API and we have few hard code values as well, So we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found