From b1b922dcdb3e5e73d55be3f43dd34147b594d1a1 Mon Sep 17 00:00:00 2001 From: Lin Clark Date: Sun, 2 Oct 2016 15:16:49 -0700 Subject: [PATCH] Bug 1306775 - New console frontend: Fix classes on page errors and console commands. r=me MozReview-Commit-ID: 97gjsvbKt1d --- .../components/message-types/console-command.js | 1 + .../components/message-types/page-error.js | 4 +++- .../webconsole/new-console-output/components/message.js | 8 +------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/devtools/client/webconsole/new-console-output/components/message-types/console-command.js b/devtools/client/webconsole/new-console-output/components/message-types/console-command.js index 25f389b6d6f4..9a1c26d07033 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/console-command.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/console-command.js @@ -35,6 +35,7 @@ function ConsoleCommand(props) { source, type, level, + topLevelClasses: [], messageBody, scrollToMessage: props.autoscroll, }; diff --git a/devtools/client/webconsole/new-console-output/components/message-types/page-error.js b/devtools/client/webconsole/new-console-output/components/message-types/page-error.js index 51ca86898d02..abf81e8de6a2 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/page-error.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/page-error.js @@ -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, diff --git a/devtools/client/webconsole/new-console-output/components/message.js b/devtools/client/webconsole/new-console-output/components/message.js index 34b66287de04..cc0df8c22e32 100644 --- a/devtools/client/webconsole/new-console-output/components/message.js +++ b/devtools/client/webconsole/new-console-output/components/message.js @@ -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();