Skip to content

Commit 9898de0

Browse files
committed
1014442: Updated contents for open/save in json
1 parent 7fcbd13 commit 9898de0

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

  • Document-Processing/code-snippet/spreadsheet/react/open-from-json-cs1/app

Document-Processing/code-snippet/spreadsheet/react/open-from-json-cs1/app/app.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ function App() {
88

99
const handleOpenFromJson = React.useCallback(() => {
1010
if (!spreadsheetRef.current) return;
11-
try {
1211
spreadsheetRef.current.openFromJson({ file: jsonData });
13-
} catch (e) {
14-
console.error('Failed to open from JSON', e);
15-
alert('Failed to open from JSON.');
16-
}
1712
}, []);
1813

1914
return (

Document-Processing/code-snippet/spreadsheet/react/open-from-json-cs1/app/app.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ function App(): React.ReactElement {
88

99
const handleOpenFromJson = React.useCallback((): void => {
1010
if (!spreadsheetRef.current) return;
11-
try {
1211
spreadsheetRef.current.openFromJson({ file: jsonData });
13-
} catch (e) {
14-
console.error('Failed to open from JSON', e);
15-
alert('Failed to open from JSON.');
16-
}
1712
}, []);
1813

1914
return (

0 commit comments

Comments
 (0)