forked from jsnbuchanan/crowd-funder-for-time-pwa
Clean up console logging and fix platform detection issues
- Reduce migration/platform logging verbosity in development mode (~80-90% less noise) - Fix AbsurdSQL platform check to support 'development' alongside 'web' - Add missing WebPlatformService methods (isWorker, initSharedArrayBuffer) - Fix Electron API endpoint resolution to prevent JSON parsing errors - Prevent circular database logging that caused [DB-PREVENTED-INFO] spam Console now shows only essential information while preserving all errors/warnings
This commit is contained in:
@@ -460,15 +460,17 @@ export const PlatformServiceMixin = {
|
||||
}
|
||||
|
||||
const settings = await this.$getSettings(MASTER_SETTINGS_KEY, defaults);
|
||||
|
||||
|
||||
// **ELECTRON-SPECIFIC FIX**: Apply platform-specific API server override
|
||||
// This ensures Electron always uses production endpoints regardless of cached settings
|
||||
if (process.env.VITE_PLATFORM === "electron") {
|
||||
// Import constants dynamically to get platform-specific values
|
||||
const { DEFAULT_ENDORSER_API_SERVER } = await import("../constants/app");
|
||||
const { DEFAULT_ENDORSER_API_SERVER } = await import(
|
||||
"../constants/app"
|
||||
);
|
||||
settings.apiServer = DEFAULT_ENDORSER_API_SERVER;
|
||||
}
|
||||
|
||||
|
||||
return (this as any)._setCached(
|
||||
cacheKey,
|
||||
settings,
|
||||
|
||||
Reference in New Issue
Block a user