show err.message in errors if present

This commit is contained in:
Matthew Hodgson 2017-04-23 02:22:31 +01:00
parent ab5ec04507
commit 40eceaf9bc
5 changed files with 22 additions and 22 deletions

View file

@ -456,8 +456,8 @@ var RoomSubList = React.createClass({
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Failed to add tag " + self.props.tagName + " to room" + err);
Modal.createDialog(ErrorDialog, {
title: "Error",
description: "Failed to add tag " + self.props.tagName + " to room",
title: "Failed to add tag " + self.props.tagName + " to room",
description: ((err && err.message) ? err.message : "Operation failed"),
});
});
break;