Skip to content

10.0.2

Compare
Choose a tag to compare
@dominictobias dominictobias released this 05 Jun 11:12
· 86 commits to master since this release

No changes just a fix for SSR that was regressed in 10.0.1.

Trying to assign document to a variable on load caused issues with some SSR setups (e.g. NextJS). Now document is by default as a function that is evaluated during render to fix this.

If you wish to override document you can choose to keep it a function so that it works better with SSR:

class IframeReactCrop extends ReactCrop {
  get document() {
    return window.top.document
  }
}