Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 1e749e7

Browse files
author
jwngr
committed
Downgraded error to warning and used $log
1 parent dddf524 commit 1e749e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/firebase.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
//
1010
// * `ref`: A Firebase reference. Queries or limits may be applied.
1111
// * `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) {
1414
function AngularFire(ref, config) {
1515
// make the new keyword optional
1616
if (!(this instanceof AngularFire)) {
@@ -204,7 +204,7 @@
204204
// determine when initial load is completed
205205
ref.once('value', function(snap) {
206206
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.');
208208
}
209209

210210
resolve(null);
@@ -289,7 +289,7 @@
289289
ref.on('value', applyUpdate, error);
290290
ref.once('value', function(snap) {
291291
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.');
293293
}
294294

295295
resolve(null);

0 commit comments

Comments
 (0)