Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created January 7, 2021 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonLaster/a76796b2005f2242a565685bd7b61121 to your computer and use it in GitHub Desktop.
Save jasonLaster/a76796b2005f2242a565685bd7b61121 to your computer and use it in GitHub Desktop.
diff --git a/src/devtools/client/webconsole/components/Output/Message.js b/src/devtools/client/webconsole/components/Output/Message.js
index d7b51742..66199aa7 100644
--- a/src/devtools/client/webconsole/components/Output/Message.js
+++ b/src/devtools/client/webconsole/components/Output/Message.js
@@ -11,7 +11,6 @@ const { actions } = require("ui/actions/index");
const { MESSAGE_TYPE } = require("devtools/client/webconsole/constants");
const { MessageIndent } = require("devtools/client/webconsole/components/Output/MessageIndent");
const MessageIcon = require("devtools/client/webconsole/components/Output/MessageIcon");
-const { CloseButton } = require("devtools/client/debugger/src/components/shared/Button");
const FrameView = createFactory(require("devtools/client/shared/components/Frame"));
const CollapseButton = require("devtools/client/webconsole/components/Output/CollapseButton");
@@ -19,6 +18,10 @@ const MessageRepeat = require("devtools/client/webconsole/components/Output/Mess
const PropTypes = require("prop-types");
const SmartTrace = require("devtools/client/shared/components/SmartTrace");
+function toBigInt(num) {
+ return num ? BigInt(num) : undefined;
+}
+
class Message extends Component {
static get propTypes() {
return {
@@ -148,7 +151,7 @@ class Message extends Component {
isFirstMessageForPoint,
} = this.props;
- if (inWarningGroup || !pausedExecutionPoint || !executionPoint || !frame) {
+ if (inWarningGroup || !executionPoint || !frame) {
return undefined;
}
@@ -161,11 +164,11 @@ class Message extends Component {
this.onViewSourceInDebugger({ ...frame, url: frame.source });
};
- if (BigInt(executionPoint) > BigInt(pausedExecutionPoint)) {
+ if (toBigInt(executionPoint) > toBigInt(pausedExecutionPoint)) {
overlayType = "fast-forward";
label = "Fast Forward";
onClick = onRewindClick;
- } else if (BigInt(executionPoint) < BigInt(pausedExecutionPoint)) {
+ } else if (toBigInt(executionPoint) < toBigInt(pausedExecutionPoint)) {
overlayType = "rewind";
label = "Rewind";
onClick = onRewindClick;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment