Browse Source

fix(appstate.ts): Remove unnecessary console.error as it was polluting Sentry (#2637)

Aakansha Doshi 4 năm trước cách đây
mục cha
commit
9bac44ee75

+ 0 - 5
src/appState.ts

@@ -166,11 +166,6 @@ const _clearAppStateForStorage = <ExportType extends "export" | "browser">(
   const stateForExport = {} as { [K in ExportableKeys]?: typeof appState[K] };
   const stateForExport = {} as { [K in ExportableKeys]?: typeof appState[K] };
   for (const key of Object.keys(appState) as (keyof typeof appState)[]) {
   for (const key of Object.keys(appState) as (keyof typeof appState)[]) {
     const propConfig = APP_STATE_STORAGE_CONF[key];
     const propConfig = APP_STATE_STORAGE_CONF[key];
-    if (!propConfig) {
-      console.error(
-        `_clearAppStateForStorage: appState key "${key}" config doesn't exist for "${exportType}" export type`,
-      );
-    }
     if (propConfig?.[exportType]) {
     if (propConfig?.[exportType]) {
       // @ts-ignore see https://github.com/microsoft/TypeScript/issues/31445
       // @ts-ignore see https://github.com/microsoft/TypeScript/issues/31445
       stateForExport[key] = appState[key];
       stateForExport[key] = appState[key];

+ 1 - 1
src/packages/excalidraw/CHANGELOG.MD

@@ -25,7 +25,7 @@ Please add the latest change on the top under the correct section.
 - Support CSV graphs and improve the look and feel [#2495](https://github.com/excalidraw/excalidraw/pull/2495)
 - Support CSV graphs and improve the look and feel [#2495](https://github.com/excalidraw/excalidraw/pull/2495)
 
 
 ### Fixes
 ### Fixes
-
+- Remove unnecessary console.error as it was polluting Sentry [#2637](https://github.com/excalidraw/excalidraw/pull/2637)
 - Fix scroll-to-center on init for non-zero canvas offsets [#2445](https://github.com/excalidraw/excalidraw/pull/2445)
 - Fix scroll-to-center on init for non-zero canvas offsets [#2445](https://github.com/excalidraw/excalidraw/pull/2445)
 - Hide collab button when onCollabButtonClick not supplied [#2598](https://github.com/excalidraw/excalidraw/pull/2598)
 - Hide collab button when onCollabButtonClick not supplied [#2598](https://github.com/excalidraw/excalidraw/pull/2598)
 - Fix resizing the pasted charts [#2586](https://github.com/excalidraw/excalidraw/pull/2586)
 - Fix resizing the pasted charts [#2586](https://github.com/excalidraw/excalidraw/pull/2586)