mirror of
https://github.com/documize/community.git
synced 2025-08-02 03:55:24 +02:00
Default to empty array results in Ember services
This commit is contained in:
parent
38e8c4665a
commit
8d65c2d571
10 changed files with 36 additions and 11 deletions
|
@ -102,6 +102,7 @@ export default BaseService.extend({
|
|||
method: "GET"
|
||||
}).then((response) => {
|
||||
let data = [];
|
||||
if (is.not.array(response)) response = [];
|
||||
|
||||
data = response.map((obj) => {
|
||||
let data = this.get('store').normalize('folder', obj);
|
||||
|
@ -118,6 +119,7 @@ export default BaseService.extend({
|
|||
method: "GET"
|
||||
}).then((response) => {
|
||||
let data = [];
|
||||
if (is.not.array(response)) response = [];
|
||||
|
||||
data = response.map((obj) => {
|
||||
let data = this.get('store').normalize('space-permission', obj);
|
||||
|
@ -176,6 +178,7 @@ export default BaseService.extend({
|
|||
method: "GET"
|
||||
}).then((response) => {
|
||||
let data = [];
|
||||
if (is.not.array(response)) response = [];
|
||||
|
||||
data = response.map((obj) => {
|
||||
let data = this.get('store').normalize('folder', obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue