Skip to content

[FIX] WindowResizers unhandled promise rejection - PR#57 in cortex-ide #29531

@TJUEZ

Description

@TJUEZ

Description

Fixed the unhandled promise rejection issue in WindowResizers.tsx by adding try/catch to the onResized callback.

Root Cause

The WindowResizers.tsx component calls checkWindowState() in the onResized callback without error handling. When the Tauri window state APIs fail (e.g., during DevTools interaction), the rejected promise becomes an unhandled promise rejection.

Fix

Added try/catch wrapper around await checkWindowState() in the callback.

Changes

  • src/components/cortex/titlebar/WindowResizers.tsx: Added try/catch in onResized callback

PR

CortexLM/cortex-ide#57

Testing

  • Open DevTools
  • Click Console tab
  • No unhandled promise rejection should appear

This fix resolves issue #20036

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideIssues related to IDEinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions