Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 1f0397c

Browse files
author
Denny Beulen
committed
Merge remote-tracking branch 'upstream/master'
2 parents ec6a7e7 + 242cfd1 commit 1f0397c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

firebase.android.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ firebase.query = function (updateCallback, path, options) {
15491549
} else if (options.orderBy.type === firebase.QueryOrderByType.PRIORITY) {
15501550
query = firebase.instance.child(path).orderByPriority();
15511551
} else if (options.orderBy.type === firebase.QueryOrderByType.CHILD) {
1552-
if (!options.orderBy.value) {
1552+
if (options.orderBy.value === undefined || options.orderBy.value === null) {
15531553
reject("When orderBy.type is 'child' you must set orderBy.value as well.");
15541554
return;
15551555
}
@@ -1561,7 +1561,7 @@ firebase.query = function (updateCallback, path, options) {
15611561

15621562
// range
15631563
if (options.range && options.range.type) {
1564-
if (!options.range.value) {
1564+
if (options.range.value === undefined || options.range.value === null) {
15651565
reject("Please set range.value");
15661566
return;
15671567
}
@@ -1581,7 +1581,7 @@ firebase.query = function (updateCallback, path, options) {
15811581
if (options.ranges) {
15821582
for (var i=0; i < options.ranges.length; i++) {
15831583
var range = options.ranges[i];
1584-
if (!range.value) {
1584+
if (range.value === undefined || range.value === null) {
15851585
reject("Please set ranges["+i+"].value");
15861586
return;
15871587
}
@@ -1600,7 +1600,7 @@ firebase.query = function (updateCallback, path, options) {
16001600

16011601
// limit
16021602
if (options.limit && options.limit.type) {
1603-
if (!options.limit.value) {
1603+
if (options.limit.value === undefined || options.limit.value === null) {
16041604
reject("Please set limit.value");
16051605
return;
16061606
}

firebase.ios.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ firebase.query = function (updateCallback, path, options) {
15941594
} else if (options.orderBy.type === firebase.QueryOrderByType.PRIORITY) {
15951595
query = where.queryOrderedByPriority();
15961596
} else if (options.orderBy.type === firebase.QueryOrderByType.CHILD) {
1597-
if (!options.orderBy.value) {
1597+
if (options.orderBy.value === undefined || options.orderBy.value === null) {
15981598
reject("When orderBy.type is 'child' you must set orderBy.value as well.");
15991599
return;
16001600
}
@@ -1606,7 +1606,7 @@ firebase.query = function (updateCallback, path, options) {
16061606

16071607
// range
16081608
if (options.range && options.range.type) {
1609-
if (!options.range.value) {
1609+
if (options.range.value === undefined || options.range.value === null) {
16101610
reject("Please set range.value");
16111611
return;
16121612
}
@@ -1626,7 +1626,7 @@ firebase.query = function (updateCallback, path, options) {
16261626
if (options.ranges) {
16271627
for (var i=0; i < options.ranges.length; i++) {
16281628
var range = options.ranges[i];
1629-
if (!range.value) {
1629+
if (range.value === undefined || range.value === null) {
16301630
reject("Please set ranges["+i+"].value");
16311631
return;
16321632
}
@@ -1645,7 +1645,7 @@ firebase.query = function (updateCallback, path, options) {
16451645

16461646
// limit
16471647
if (options.limit && options.limit.type) {
1648-
if (!options.limit.value) {
1648+
if (options.limit.value === undefined || options.limit.value === null) {
16491649
reject("Please set limit.value");
16501650
return;
16511651
}

0 commit comments

Comments
 (0)