Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "supernova-container-template",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
4 changes: 3 additions & 1 deletion supernova/helpers/snErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class SnErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundary
}

if (window.parent && window.parent !== window) {
const urlWithoutExtraPath = `${window.location.origin}/${window.location.pathname.split("/").at(1)}`;
window.parent.postMessage(
{
source: "prototype",
Expand All @@ -130,6 +131,7 @@ export class SnErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundary
message: error?.message ?? "Unknown error",
stack: error?.stack,
componentStack: errorInfo.componentStack,
url: urlWithoutExtraPath,
},
},
"*"
Expand All @@ -144,7 +146,7 @@ export class SnErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundary
<div style={containerStyle}>
<img src={snError} alt="Error illustration" style={imageStyle} />
<div style={titleStyle}>Something went wrong</div>
<p style={messageStyle}>Try refreshing or fixing with Supernova AI </p>
<p style={messageStyle}>Try refreshing or fixing with Supernova AI</p>
<button
style={buttonStyle}
onClick={() => window.location.reload()}
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
commonjsOptions: {
include: [/private-deps/, /node_modules/],
},
minify: false,
},
});

Expand Down