@@ -393,13 +393,11 @@ async function handleScopedRequest(event: FetchEvent, scope: string) {
393393 // @see controlledIframe below for more details.
394394 if (
395395 // WordPress Core version of block-editor.js
396- unscopedUrl . pathname . endsWith ( '/wp-includes/js/dist/block-editor.js' ) ||
397- unscopedUrl . pathname . endsWith (
398- '/wp-includes/js/dist/block-editor.min.js'
399- ) ||
396+ unscopedUrl . pathname . endsWith ( '/block-editor.js' ) ||
397+ unscopedUrl . pathname . endsWith ( '/block-editor.min.js' ) ||
400398 // Gutenberg version of block-editor.js
401- unscopedUrl . pathname . endsWith ( '/build/ block-editor/index.js' ) ||
402- unscopedUrl . pathname . endsWith ( '/build/ block-editor/index.min.js' )
399+ unscopedUrl . pathname . endsWith ( '/block-editor/index.js' ) ||
400+ unscopedUrl . pathname . endsWith ( '/block-editor/index.min.js' )
403401 ) {
404402 const script = await workerResponse . text ( ) ;
405403 const newScript = `${ controlledIframe } ${ script . replace (
@@ -470,15 +468,15 @@ window.__playground_ControlledIframe = window.wp.element.forwardRef(function (pr
470468 */
471469 const __playground_readBlobAsText = function (url) {
472470 try {
473- let xhr = new XMLHttpRequest();
474- xhr.open('GET', url, false);
475- xhr.overrideMimeType('text/plain;charset=utf-8');
476- xhr.send();
477- return xhr.responseText;
471+ let xhr = new XMLHttpRequest();
472+ xhr.open('GET', url, false);
473+ xhr.overrideMimeType('text/plain;charset=utf-8');
474+ xhr.send();
475+ return xhr.responseText;
478476 } catch(e) {
479- return '';
477+ return '';
480478 } finally {
481- URL.revokeObjectURL(url);
479+ URL.revokeObjectURL(url);
482480 }
483481 };
484482 if (props.srcDoc) {
0 commit comments