Skip to content

Commit 41be6a1

Browse files
niyabitsCompuIves
authored andcommitted
Clear Console after opening a new Sandbox in the same folder. (codesandbox#2660)
* Added clear-console in handleSandboxChange * Clear console in handleSandboxChange * Added some space * Revert "Added clear-console in handleSandboxChange" This reverts commit 95d3e96. modified: packages/common/src/components/Preview/index.tsx * Dispatch Clear Console in handleSandboxChange
1 parent 8a4e363 commit 41be6a1

File tree

1 file changed

+1
-0
lines changed
  • packages/common/src/components/Preview

1 file changed

+1
-0
lines changed

packages/common/src/components/Preview/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ class BasePreview extends React.Component<Props, State> {
243243
resetState();
244244

245245
const url = this.currentUrl();
246+
dispatch({ type: 'clear-console' });
246247

247248
if (this.serverPreview) {
248249
setTimeout(() => {

0 commit comments

Comments
 (0)