From ee2101bf1b71af09bf0c00e1eaeb6ba184d22643 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 2 Oct 2018 15:44:59 +0200 Subject: [PATCH] Fix TypeError in edit-in-place component. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue being that the default export was called automatically and didn’t accept a ngModule. --- client/app/components/EditInPlace.jsx | 7 ++++++- client/app/components/edit-in-place.js | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 client/app/components/edit-in-place.js diff --git a/client/app/components/EditInPlace.jsx b/client/app/components/EditInPlace.jsx index 0879591a7a..aaf146add4 100644 --- a/client/app/components/EditInPlace.jsx +++ b/client/app/components/EditInPlace.jsx @@ -1,7 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { react2angular } from 'react2angular'; -export default class EditInPlace extends React.Component { +export class EditInPlace extends React.Component { static propTypes = { ignoreBlanks: PropTypes.bool, isEditable: PropTypes.bool, @@ -83,3 +84,7 @@ export default class EditInPlace extends React.Component { return this.renderNormal(); } } + +export default function init(ngModule) { + ngModule.component('editInPlace', react2angular(EditInPlace)); +} diff --git a/client/app/components/edit-in-place.js b/client/app/components/edit-in-place.js deleted file mode 100644 index f41e1e3ad9..0000000000 --- a/client/app/components/edit-in-place.js +++ /dev/null @@ -1,6 +0,0 @@ -import { react2angular } from 'react2angular'; -import EditInPlace from './EditInPlace.jsx'; - -export default function init(ngModule) { - ngModule.component('editInPlace', react2angular(EditInPlace)); -}