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

Commit 094b7e6

Browse files
author
Denny Beulen
committed
Fixed merge of pullrequest 444
1 parent 99ef14b commit 094b7e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
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
}

0 commit comments

Comments
 (0)