diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 56ac082f2a..c2e51d878b 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -154,6 +154,11 @@ module.exports = withMatrixClient(React.createClass({ isTwelveHour: PropTypes.bool, }, + defaultProps: { + // no-op function because onWidgetLoad is optional yet some subcomponents assume its existence + onWidgetLoad: function() {}, + }, + getInitialState: function() { return { // Whether the context menu is being displayed. diff --git a/src/components/views/rooms/ReplyPreview.js b/src/components/views/rooms/ReplyPreview.js index dd11b0df33..46e2826634 100644 --- a/src/components/views/rooms/ReplyPreview.js +++ b/src/components/views/rooms/ReplyPreview.js @@ -75,11 +75,8 @@ export default class ReplyPreview extends React.Component { ; } } - -function dummyOnWidgetLoad() {}