This repository was archived by the owner on Mar 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,15 @@ FirebaseRefNotProvidedError.prototype.constructor = FirebaseRefNotProvidedError;
1010
1111function FirebaseRef ( ) {
1212 this . urls = null ;
13- this . singleUrl = false ;
1413 this . registerUrl = function registerUrl ( urlOrConfig ) {
1514
1615 if ( typeof urlOrConfig === 'string' ) {
1716 this . urls = { } ;
1817 this . urls . default = urlOrConfig ;
19- this . singleUrl = true ;
2018 }
2119
2220 if ( angular . isObject ( urlOrConfig ) ) {
2321 this . urls = urlOrConfig ;
24- this . singleUrl = false ;
2522 }
2623
2724 } ;
@@ -32,13 +29,7 @@ function FirebaseRef() {
3229 }
3330 } ;
3431
35- this . $$createSingleRef = function $$createSingleRef ( defaultUrl ) {
36- var error = this . $$checkUrls ( defaultUrl ) ;
37- if ( error ) { throw error ; }
38- return new Firebase ( defaultUrl ) ;
39- } ;
40-
41- this . $$createMultipleRefs = function $$createMultipleRefs ( urlConfig ) {
32+ this . $$createRefsFromUrlConfig = function $$createMultipleRefs ( urlConfig ) {
4233 var error = this . $$checkUrls ( urlConfig ) ;
4334 if ( error ) { throw error ; }
4435 var defaultUrl = urlConfig . default ;
@@ -55,13 +46,7 @@ function FirebaseRef() {
5546 } ;
5647
5748 this . $get = function FirebaseRef_$get ( ) {
58-
59- if ( this . singleUrl ) {
60- return this . $$createSingleRef ( this . urls . default ) ;
61- } else {
62- return this . $$createMultipleRefs ( this . urls ) ;
63- }
64-
49+ return this . $$createRefsFromUrlConfig ( this . urls ) ;
6550 } ;
6651}
6752
You can’t perform that action at this time.
0 commit comments