Skip to content

Commit 427c7c9

Browse files
更新 Toolbar.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 24abefe commit 427c7c9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/designer/src/components/Toolbar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ export const Toolbar: React.FC = () => {
8484
const parsed = JSON.parse(json);
8585
setSchema(parsed);
8686
} catch (error) {
87-
console.error('Failed to import file:', error);
87+
setImportError(error instanceof Error ? error.message : 'Failed to import JSON file');
88+
setShowImportDialog(true);
8889
}
8990
};
9091
reader.readAsText(file);

0 commit comments

Comments
 (0)