From 90782050f4888badf35e5c3eab6d97be89d4c930 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Mon, 6 Aug 2018 13:20:29 +1000 Subject: [PATCH] Fix unrecognised `forwardedRef` prop error Have `withGlobalEvents` omit the `forwardedRef` prop. This prevents the prop being added to HTML in some cases, e.g. when used in `FocusableIframe`. --- packages/compose/src/with-global-events/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/compose/src/with-global-events/index.js b/packages/compose/src/with-global-events/index.js index f9d2c8b194756d..6b82ff55110499 100644 --- a/packages/compose/src/with-global-events/index.js +++ b/packages/compose/src/with-global-events/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { forEach } from 'lodash'; +import { forEach, omit } from 'lodash'; /** * WordPress dependencies @@ -61,7 +61,12 @@ function withGlobalEvents( eventTypesToHandlers ) { } render() { - return ; + return ( + + ); } }