Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>
  • Loading branch information
Petter Walbø Johnsgård and dcalhoun committed Oct 13, 2022
1 parent 42d976b commit c8678b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/components/src/sandbox/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import { usePreferredColorScheme } from '@wordpress/compose';
import sandboxStyles from './style.scss';

const observeAndResizeJS = function () {
// Hermes requires a special directive to preserve the original source code
// when using `Function.prototype.toString()` below.
// https://github.com/facebook/hermes/issues/114#issuecomment-887106990
'show source';
const { MutationObserver } = window;

if ( ! MutationObserver || ! document.body || ! window.parent ) {
Expand Down

0 comments on commit c8678b9

Please sign in to comment.