|
9 | 9 | // |
10 | 10 | // * `ref`: A Firebase reference. Queries or limits may be applied. |
11 | 11 | // * `config`: An object containing any of the advanced config options explained in API docs |
12 | | - .factory("$firebase", [ "$firebaseUtils", "$firebaseConfig", |
13 | | - function ($firebaseUtils, $firebaseConfig) { |
| 12 | + .factory("$firebase", [ "$log", "$firebaseUtils", "$firebaseConfig", |
| 13 | + function ($log, $firebaseUtils, $firebaseConfig) { |
14 | 14 | function AngularFire(ref, config) { |
15 | 15 | // make the new keyword optional |
16 | 16 | if (!(this instanceof AngularFire)) { |
|
204 | 204 | // determine when initial load is completed |
205 | 205 | ref.once('value', function(snap) { |
206 | 206 | if (angular.isArray(snap.val())) { |
207 | | - throw new Error('Storing data using array indices in Firebase can result in unexpected behavior. See https://www.firebase.com/docs/rest/guide/understanding-data.html#section-arrays-in-firebase for more information.'); |
| 207 | + $log.warn('Storing data using array indices in Firebase can result in unexpected behavior. See https://www.firebase.com/docs/web/guide/understanding-data.html#section-arrays-in-firebase for more information.'); |
208 | 208 | } |
209 | 209 |
|
210 | 210 | resolve(null); |
|
289 | 289 | ref.on('value', applyUpdate, error); |
290 | 290 | ref.once('value', function(snap) { |
291 | 291 | if (angular.isArray(snap.val())) { |
292 | | - throw new Error('Storing data using array indices in Firebase can result in unexpected behavior. See https://www.firebase.com/docs/rest/guide/understanding-data.html#section-arrays-in-firebase for more information.'); |
| 292 | + $log.warn('Storing data using array indices in Firebase can result in unexpected behavior. See https://www.firebase.com/docs/web/guide/understanding-data.html#section-arrays-in-firebase for more information.'); |
293 | 293 | } |
294 | 294 |
|
295 | 295 | resolve(null); |
|
0 commit comments