Skip to content

Commit ecc6218

Browse files
BUGFIX: adjust existence check for AssetUploadScreen
1 parent a22cbb8 commit ecc6218

File tree

1 file changed

+2
-3
lines changed
  • packages/neos-ui-editors/src/Editors/Image

1 file changed

+2
-3
lines changed

packages/neos-ui-editors/src/Editors/Image/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,10 @@ export default class ImageEditor extends Component {
216216

217217
handleChooseFile = () => {
218218
const {secondaryEditorsRegistry, options} = this.props;
219-
const {component: AssetUploadScreen} = secondaryEditorsRegistry.get('Neos.Neos/Inspector/Secondary/Editors/AssetUploadScreen');
220-
221-
if (AssetUploadScreen) {
219+
if (secondaryEditorsRegistry.get('Neos.Neos/Inspector/Secondary/Editors/AssetUploadScreen')) {
222220
// set media type constraint to "image/*" if it is not explicitly specified via options.constraints.mediaTypes
223221
const constraints = {...options.constraints, mediaTypes: (options.constraints && options.constraints.mediaTypes) || ['image/*']};
222+
const {component: AssetUploadScreen} = secondaryEditorsRegistry.get('Neos.Neos/Inspector/Secondary/Editors/AssetUploadScreen');
224223
this.props.renderSecondaryInspector('IMAGE_UPLOAD_MEDIA', () => <AssetUploadScreen type="images" constraints={constraints} onComplete={this.afterUpload}/>);
225224
} else {
226225
this.previewScreen.chooseFromLocalFileSystem();

0 commit comments

Comments
 (0)