svelte-firekit 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/firebase.js +5 -1
- package/package.json +1 -1
package/dist/firebase.js
CHANGED
|
@@ -7,7 +7,7 @@ import { getStorage } from 'firebase/storage';
|
|
|
7
7
|
import { getAnalytics, isSupported as isAnalyticsSupported } from 'firebase/analytics';
|
|
8
8
|
import { getPerformance } from 'firebase/performance';
|
|
9
9
|
import { getMessaging, isSupported as isMessagingSupported } from 'firebase/messaging';
|
|
10
|
-
import { getFirekitConfig } from './config.js';
|
|
10
|
+
import { getFirekitConfig, isFirekitConfigured } from './config.js';
|
|
11
11
|
import { FirebaseServiceStatus, FirebaseServiceError } from './types/firebase.js';
|
|
12
12
|
/**
|
|
13
13
|
* Singleton service that manages all Firebase service instances.
|
|
@@ -52,6 +52,10 @@ class FirebaseService {
|
|
|
52
52
|
}
|
|
53
53
|
if (this.firebaseApp)
|
|
54
54
|
return this.firebaseApp;
|
|
55
|
+
// Config not set yet — retryable, do not mark as ERROR
|
|
56
|
+
if (!isFirekitConfigured()) {
|
|
57
|
+
throw new FirebaseServiceError('Firekit is not configured. Call initFirekit(config) before using any Firekit services.', 'app');
|
|
58
|
+
}
|
|
55
59
|
try {
|
|
56
60
|
this.status = FirebaseServiceStatus.INITIALIZING;
|
|
57
61
|
const existingApps = getApps();
|