Skip to content

Commit

Permalink
Throw away errors from unrelated window messages #361
Browse files Browse the repository at this point in the history
  • Loading branch information
iann0036 committed Mar 17, 2024
1 parent c392397 commit 22d7fa0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,9 @@ $(document).ready(function(){
});

window.addEventListener('message', (message) => {
var evt = JSON.parse(message.data);
try {
var evt = JSON.parse(message.data);
} catch(err) {};
if (evt['event'] == "init") {
clearDiagram();
} else if (evt['event'] == "export") {
Expand Down

0 comments on commit 22d7fa0

Please sign in to comment.