K
K
Klaus Kater2016-04-14 15:18:44
Ember.js
Klaus Kater, 2016-04-14 15:18:44

How to return Ember an empty response?

Hello. There is no data for the standard query this.store.queryRecord('model', { filter: { open: true } }), they simply do not match the condition in the database, but it is not clear how to return an empty array to the member .. for any answers without data swears

ember.debug.js:28594 Error while processing route: index Assertion Failed: You made a `queryRecord` request for undefinedrecords, with query `[object Object]`, but the adapter's response did not have any data Error: Assertion Failed: You made a `queryRecord` request for undefinedrecords, with query `[object Object]`, but the adapter's response did not have any data

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Romanov, 2016-04-14
@Kaer_Morchen

What are you returning? Like this?

{
  "data": []
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question