Bug 1306775 - New console frontend: Fix classes on page errors and console commands. r=me

MozReview-Commit-ID: 97gjsvbKt1d
This commit is contained in:
Lin Clark 2016-10-02 15:16:49 -07:00
parent 7ea7afa4f6
commit b1b922dcdb
3 changed files with 5 additions and 8 deletions

View File

@ -35,6 +35,7 @@ function ConsoleCommand(props) {
source,
type,
level,
topLevelClasses: [],
messageBody,
scrollToMessage: props.autoscroll,
};

View File

@ -33,7 +33,8 @@ function PageError(props) {
} = props;
const {
id: messageId,
source, type,
source,
type,
level,
messageText: messageBody,
repeat,
@ -47,6 +48,7 @@ function PageError(props) {
source,
type,
level,
topLevelClasses: [],
messageBody,
repeat,
frame,

View File

@ -28,7 +28,7 @@ const Message = createClass({
source: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
level: PropTypes.string.isRequired,
topLevelClasses: PropTypes.array,
topLevelClasses: PropTypes.array.isRequired,
messageBody: PropTypes.any.isRequired,
repeat: PropTypes.any,
frame: PropTypes.any,
@ -40,12 +40,6 @@ const Message = createClass({
sourceMapService: PropTypes.any,
},
getDefaultProps() {
return {
topLevelClasses: [],
};
},
componentDidMount() {
if (this.props.scrollToMessage && this.messageNode) {
this.messageNode.scrollIntoView();