diff --git a/packages/ui/Placeholder/PlaceholderControllerDecorator.js b/packages/ui/Placeholder/PlaceholderControllerDecorator.js index 4df92afa51..4dccaeb40d 100644 --- a/packages/ui/Placeholder/PlaceholderControllerDecorator.js +++ b/packages/ui/Placeholder/PlaceholderControllerDecorator.js @@ -61,6 +61,7 @@ const PlaceholderContext = createContext(); */ const PlaceholderControllerDecorator = hoc(defaultConfig, (config, Wrapped) => { const {bounds, notify, thresholdFactor} = config; + const WrappedWithRef = WithRef(Wrapped); return class extends Component { static displayName = 'PlaceholderControllerDecorator'; @@ -140,7 +141,6 @@ const PlaceholderControllerDecorator = hoc(defaultConfig, (config, Wrapped) => { render () { const props = Object.assign({}, this.props); - const WrappedWithRef = WithRef(Wrapped); if (notify) props[notify] = this.handleNotify; diff --git a/packages/webos/speech/VoiceControlDecorator.js b/packages/webos/speech/VoiceControlDecorator.js index 9416bd52d4..d560083f5e 100644 --- a/packages/webos/speech/VoiceControlDecorator.js +++ b/packages/webos/speech/VoiceControlDecorator.js @@ -55,6 +55,8 @@ import {WithRef} from '@enact/core/internal/WithRef'; * @public */ const VoiceControlDecorator = hoc((config, Wrapped) => { + const WithRefComponent = WithRef(Wrapped); + return class extends Component { static displayName = 'VoiceControlDecorator'; @@ -91,7 +93,6 @@ const VoiceControlDecorator = hoc((config, Wrapped) => { render () { const props = {...this.props}; delete props.onVoice; - const WithRefComponent = WithRef(Wrapped); return (