Skip to content

Commit 4c4521a

Browse files
committed
Fixes #225.
Stable Version 1.0.0-alpha.4-0.
1 parent 37bd069 commit 4c4521a

File tree

8 files changed

+23
-12
lines changed

8 files changed

+23
-12
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 1.2.1 - 04 November 2014
2+
3+
###### Backwards compatible bug fixes
4+
- #225 - If the server returned an empty array for a get request (valid scenario), angular-data throws an exception
5+
16
##### 1.2.0 - 02 November 2014
27

38
###### Backwards compatible API changes

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Unlike Backbone and Ember Models, angular-data does not require the use of gette
88

99
Supporting relations, computed properties, model lifecycle control and a slew of other features, angular-data is the tool for giving your data the respect it deserves.
1010

11-
__Latest Release:__ [1.2.0](https://github.com/jmdobry/angular-data/releases/tag/1.2.0)
11+
__Latest Release:__ [1.2.1](https://github.com/jmdobry/angular-data/releases/tag/1.2.1)
1212

1313
Angular-data is finally 1.0.!
1414

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Jason Dobry",
33
"name": "angular-data",
44
"description": "Data store for Angular.js.",
5-
"version": "1.2.0",
5+
"version": "1.2.1",
66
"homepage": "http://angular-data.pseudobry.com/",
77
"repository": {
88
"type": "git",

dist/angular-data.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @author Jason Dobry <[email protected]>
33
* @file angular-data.js
4-
* @version 1.2.0 - Homepage <http://angular-data.pseudobry.com/>
4+
* @version 1.2.1 - Homepage <http://angular-data.pseudobry.com/>
55
* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
66
* @license MIT <https://github.com/jmdobry/angular-data/blob/master/LICENSE>
77
*
@@ -5124,7 +5124,7 @@ function errorPrefix(resourceName) {
51245124
*
51255125
* @param {string} resourceName The resource type, e.g. 'user', 'comment', etc.
51265126
* @param {string|number} id The primary key of the item of the changes to retrieve.
5127-
* @param {=object} options Optional configuration. Properties:
5127+
* @param {object=} options Optional configuration. Properties:
51285128
*
51295129
* - `{array=}` - `blacklist` - Array of strings or RegExp that specify fields that should be ignored when checking for changes.
51305130
*
@@ -6687,8 +6687,10 @@ function inject(resourceName, attrs, options) {
66876687
}
66886688

66896689
if (options.linkInverse) {
6690-
if (DS.utils.isArray(injected) && injected.length) {
6691-
DS.linkInverse(definition.name, injected[0][definition.idAttribute]);
6690+
if (DS.utils.isArray(injected)) {
6691+
if (injected.length) {
6692+
DS.linkInverse(definition.name, injected[0][definition.idAttribute]);
6693+
}
66926694
} else {
66936695
DS.linkInverse(definition.name, injected[definition.idAttribute]);
66946696
}
@@ -7700,6 +7702,7 @@ module.exports = ['$q', function ($q) {
77007702
var added = {};
77017703
var removed = {};
77027704
var changed = {};
7705+
blacklist = blacklist || [];
77037706

77047707
for (var prop in oldObject) {
77057708
var newValue = object[prop];

dist/angular-data.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-data",
33
"description": "Data store for Angular.js.",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"homepage": "http://angular-data.pseudobry.com",
66
"repository": {
77
"type": "git",

src/datastore/sync_methods/inject.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ function inject(resourceName, attrs, options) {
279279
}
280280

281281
if (options.linkInverse) {
282-
if (DS.utils.isArray(injected) && injected.length) {
283-
DS.linkInverse(definition.name, injected[0][definition.idAttribute]);
282+
if (DS.utils.isArray(injected)) {
283+
if (injected.length) {
284+
DS.linkInverse(definition.name, injected[0][definition.idAttribute]);
285+
}
284286
} else {
285287
DS.linkInverse(definition.name, injected[definition.idAttribute]);
286288
}

src/utils.js

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ module.exports = ['$q', function ($q) {
165165
var added = {};
166166
var removed = {};
167167
var changed = {};
168+
blacklist = blacklist || [];
168169

169170
for (var prop in oldObject) {
170171
var newValue = object[prop];

0 commit comments

Comments
 (0)