Skip to content

Commit

Permalink
Use named import of renderToStaticMarkup
Browse files Browse the repository at this point in the history
Improves compatibility with Preact
  • Loading branch information
wojtekmaj committed Jul 5, 2022
1 parent 5a9106c commit 6a06664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Page/TextLayer.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { createRef, PureComponent } from 'react';
import ReactDOMServer from 'react-dom/server';
import { renderToStaticMarkup } from 'react-dom/server';
import PropTypes from 'prop-types';
import makeCancellable from 'make-cancellable-promise';
import invariant from 'tiny-invariant';
Expand Down Expand Up @@ -140,7 +140,7 @@ export class TextLayerInternal extends PureComponent {
itemIndex: elementIndex,
...textContent.items[elementIndex],
});
element.innerHTML = ReactDOMServer.renderToStaticMarkup(reactContent);
element.innerHTML = renderToStaticMarkup(reactContent);
});
}
this.onRenderSuccess();
Expand Down

0 comments on commit 6a06664

Please sign in to comment.