mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15: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
|
@ -25,7 +25,7 @@ export default Service.extend({
|
|||
this._super(...arguments);
|
||||
this.pins = [];
|
||||
},
|
||||
|
||||
|
||||
getUserPins() {
|
||||
let userId = this.get('session.user.id');
|
||||
|
||||
|
@ -93,9 +93,8 @@ export default Service.extend({
|
|||
method: 'POST',
|
||||
data: JSON.stringify(data)
|
||||
}).then((response) => {
|
||||
if (is.not.array(response)) {
|
||||
response = [];
|
||||
}
|
||||
if (is.not.array(response)) response = [];
|
||||
|
||||
let pins = ArrayProxy.create({
|
||||
content: A([])
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue