[android] Fix database limit type conversion

This commit is contained in:
Elliot Hesp 2017-05-03 09:25:29 +01:00 committed by GitHub
parent 70dfbc9222
commit b4622006bf
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ public class RNFirebaseDatabaseReference {
query = query.orderByChild(key); query = query.orderByChild(key);
} }
} else if ("limit".equals(type)) { } else if ("limit".equals(type)) {
int limit = (Integer) modifier.get("limit"); int limit = ((Double)modifier.get("limit")).intValue();
if ("limitToLast".equals(name)) { if ("limitToLast".equals(name)) {
query = query.limitToLast(limit); query = query.limitToLast(limit);
} else if ("limitToFirst".equals(name)) { } else if ("limitToFirst".equals(name)) {