Skip to content

Commit 4a180d1

Browse files
committed
[fixed] null everywhere
1 parent a9f7b53 commit 4a180d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var list = {
2929
},
3030

3131
transform (snapshotVal) {
32-
return snapshotVal === null ? null : toArray$(snapshotVal);
32+
return toArray$(snapshotVal);
3333
},
3434

3535
toString () {
@@ -88,6 +88,8 @@ var createRefForReals = (Firebase, path, routes, host) => {
8888
};
8989
var parse = (snapshot, cb) => {
9090
var snapshotVal = snapshot.val();
91+
if (snapshotVal === null)
92+
return cb(null, null);
9193
var transformed = handler.transform ? handler.transform(snapshotVal) : snapshotVal;
9294
addIdForLists(snapshotVal, matchInfo.route, path);
9395
addRelationships(transformed, matchInfo);

tests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('ref', () => {
5555
});
5656
});
5757

58-
it.only('handles null values for lists', (done) => {
58+
it('handles null values for lists', (done) => {
5959
var schema = Schema.create(Firebase, HOST, (child) => {
6060
child('test', list, (child) => {
6161
child(':id', string, (child) => {

0 commit comments

Comments
 (0)