1
0
Fork 0
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:
McMatts 2018-03-23 11:50:21 +00:00
parent 38e8c4665a
commit 8d65c2d571
10 changed files with 36 additions and 11 deletions

View file

@ -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);