Skip to content

Commit

Permalink
bugfix: async/await errors in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Nov 11, 2024
1 parent b87b2c0 commit 2270663
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/src/DocumentViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class DocumentViewer extends Component {
}
}

componentDidMount() {
async componentDidMount() {
this.props.connectDragPreview(new Image());
this.getDocumentURL(this.props.document_id);
await this.getDocumentURL(this.props.document_id.toString());
}

isEditable = () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/documentGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ export function openInitialDocs(docIds) {
return document;
})
.then(async document => {
dispatch({
await dispatch({
type: OPEN_DOCUMENT_SUCCESS,
document,
firstTarget: null,
Expand Down

0 comments on commit 2270663

Please sign in to comment.