Skip to content

Commit 0c215bc

Browse files
author
Ives van Hoorne
committed
Fix error handling
1 parent 7129ffd commit 0c215bc

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

packages/app/src/sandbox/compile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ async function compile({
500500
}
501501
firstLoad = false;
502502

503+
dispatch({ type: 'done' });
504+
503505
if (typeof window.__puppeteer__ === 'function') {
504506
window.__puppeteer__('done');
505507
}

packages/react-sandpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-smooshpack",
3-
"version": "0.0.13",
3+
"version": "0.0.14",
44
"description": "",
55
"keywords": [],
66
"license": "SEE LICENSE.MD IN ROOT",
@@ -77,7 +77,7 @@
7777
"react-broadcast": "^0.6.2",
7878
"react-codemirror2": "^4.0.1",
7979
"rollup-plugin-scss": "^0.4.0",
80-
"smooshpack": "^0.0.13"
80+
"smooshpack": "^0.0.14"
8181
},
8282
"peerDependencies": {
8383
"react": "^16.0.0"

packages/react-sandpack/src/components/SandpackProvider/SandpackProvider.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export default class SandpackProvider extends React.PureComponent<
7777

7878
handleMessage = (m: any) => {
7979
if (m.type === 'success') {
80-
this.setState({ managerState: m.state, errors: [] });
80+
this.setState({ managerState: m.state });
81+
} else if (m.type === 'done') {
82+
this.setState({ errors: [] });
8183
} else if (m.type === 'action' && m.action === 'show-error') {
8284
const { title, path, message, line, column } = m;
8385
this.setState({

packages/sandpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smooshpack",
3-
"version": "0.0.13",
3+
"version": "0.0.14",
44
"description": "",
55
"keywords": [],
66
"main": "dist/sandpack.umd.js",

0 commit comments

Comments
 (0)