Skip to content

Commit 3c98b58

Browse files
committed
fix: fix optional argument
1 parent 1bbb841 commit 3c98b58

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

ios/Classes/FirebaseDatabaseModule.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ - (NSString *)moduleId
3636

3737
- (FirebaseDatabaseReferenceProxy *)getReference:(id)arguments
3838
{
39-
ENSURE_SINGLE_ARG(arguments, NSDictionary);
39+
ENSURE_SINGLE_ARG_OR_NIL(arguments, NSDictionary);
40+
41+
if (arguments == nil) {
42+
arguments = [NSDictionary dictionary];
43+
}
4044

4145
NSString *identifier = [arguments objectForKey:@"identifier"];
4246
NSString *path = [arguments objectForKey:@"path"];
@@ -51,6 +55,8 @@ - (FirebaseDatabaseReferenceProxy *)getReference:(id)arguments
5155
reference = [[FIRDatabase database] referenceWithPath:path];
5256
} else if (url != nil) {
5357
reference = [[FIRDatabase database] referenceFromURL:url];
58+
} else {
59+
reference = [[FIRDatabase database] reference];
5460
}
5561

5662
if (reference == nil) {

ios/manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 2.0.0
5+
version: 2.0.1
66
apiversion: 2
77
architectures: arm64 x86_64
88
description: titanium-firebase-database

ios/titanium.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
55
//
66
//
7-
TITANIUM_SDK_VERSION = 10.1.0.GA
7+
TITANIUM_SDK_VERSION = 10.1.1.GA
88

99
//
1010
// THESE SHOULD BE OK GENERALLY AS-IS

0 commit comments

Comments
 (0)