mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-10 16:22:38 +02:00
fix: gate console.log calls behind development check
Wraps unguarded console.log statements in use-connectors-electric, mcp-config-validator, and ElectricProvider behind an IS_DEV guard, matching the existing pattern in lib/electric/client.ts. Keeps console.error calls untouched so real errors still surface. Fixes #904
This commit is contained in:
parent
5da2d95d80
commit
b240057c61
3 changed files with 14 additions and 8 deletions
|
|
@ -5,6 +5,8 @@ import type { SearchSourceConnector } from "@/contracts/types/connector.types";
|
|||
import type { SyncHandle } from "@/lib/electric/client";
|
||||
import { useElectricClient } from "@/lib/electric/context";
|
||||
|
||||
const IS_DEV = process.env.NODE_ENV === "development";
|
||||
|
||||
/**
|
||||
* Hook for managing connectors with Electric SQL real-time sync
|
||||
*
|
||||
|
|
@ -72,7 +74,7 @@ export function useConnectorsElectric(searchSpaceId: number | string | null) {
|
|||
|
||||
async function startSync() {
|
||||
try {
|
||||
console.log("[useConnectorsElectric] Starting sync for search space:", searchSpaceId);
|
||||
if (IS_DEV) console.log("[useConnectorsElectric] Starting sync for search space:", searchSpaceId);
|
||||
|
||||
const handle = await electricClient.syncShape({
|
||||
table: "search_source_connectors",
|
||||
|
|
@ -80,7 +82,7 @@ export function useConnectorsElectric(searchSpaceId: number | string | null) {
|
|||
primaryKey: ["id"],
|
||||
});
|
||||
|
||||
console.log("[useConnectorsElectric] Sync started:", {
|
||||
if (IS_DEV) console.log("[useConnectorsElectric] Sync started:", {
|
||||
isUpToDate: handle.isUpToDate,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue