Skip to content

Commit

Permalink
fix: more hacky, more better
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Oct 2, 2019
1 parent 20a8a5a commit e7a7df7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ReportView/ReportView.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ const ReportView = ({
let didCancel = false

// Wait for map to render
// TODO: SUPER hacky
// TODO: SUPER hacky - we need to wait for the map to render
const timeoutId = setTimeout(() => {
if (didCancel) return
window.print()
setPrint(false)
}, 1000)
}, 3000)
return () => {
didCancel = true
if (timeoutId) clearTimeout(timeoutId)
Expand Down

0 comments on commit e7a7df7

Please sign in to comment.