Skip to content

Commit 39a016b

Browse files
committed
Fix Sentry bugs
1 parent 2935daf commit 39a016b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/app/src/app/store/modules/editor/actions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ export function unsetDirtyTab({ state }) {
218218
tab => tab.moduleShortid === currentModule.shortid
219219
);
220220

221-
state.set(`editor.tabs.${tabIndex}.dirty`, false);
221+
if (tabIndex !== -1) {
222+
state.set(`editor.tabs.${tabIndex}.dirty`, false);
223+
}
222224
}
223225

224226
export function outputChangedModules({ state }) {

packages/app/src/app/utils/get-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const mdRegex = /\.md$/;
1414
const vueRegex = /\.vue$/;
1515
const svgRegex = /\.svg$/;
1616

17-
export function getMode(title: string) {
17+
export function getMode(title: string = '') {
1818
if (title === 'favicon.ico') {
1919
return 'favicon';
2020
}

packages/codesandbox-api/src/dispatcher/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function notifyListeners(data: Object, source?: MessageEvent['source']) {
5959
function notifyFrames(message: Object) {
6060
const rawMessage = JSON.parse(JSON.stringify(message));
6161
bundlers.forEach(frame => {
62-
if (frame) {
62+
if (frame && frame.postMessage) {
6363
frame.postMessage({ ...rawMessage, codesandbox: true }, '*');
6464
}
6565
});

0 commit comments

Comments
 (0)