From 1747fa163a6799b0ca8e03b1b69dd9eb3520e593 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin <622599+aaronjorbin@users.noreply.github.com> Date: Tue, 30 Jun 2026 15:50:31 -0500 Subject: [PATCH] Prevent typescript error --- tools/gutenberg/copy.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gutenberg/copy.js b/tools/gutenberg/copy.js index 2d342951dc2ba..2a9bb321bc800 100644 --- a/tools/gutenberg/copy.js +++ b/tools/gutenberg/copy.js @@ -499,8 +499,12 @@ function generateScriptLoaderPackages() { if ( Array.isArray( assetData.module_dependencies ) ) { assetData.module_dependencies = assetData.module_dependencies.filter( + /** + * @param {string|{ id: string }} dep + * @return {boolean} + */ ( dep ) => - ! ( dep.id || dep ).startsWith( + ! ( typeof dep === 'string' ? dep : dep.id ).startsWith( '@wordpress/vips' ) );