question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[object Object] when dangerMode={true}

See original GitHub issue

Hi there,

When I set dangerMode={true} with every command I always get:[object Object] echoed back before my content is displayed.

        <Terminal
          dangerMode
          style={termStyle}
          commands={commands}
          welcomeMessage="HISAC Emergency Terminal. Authorised access only!"
          promptLabel={promptLabel}
          autoFocus
          ref={ref}
          noAutoScroll
        />

when any of my commands the [object] [Object] comes up:

[object Object]
Processing...
PRE: DIR: ARCHIVES
PRE: RES: INTENRAL
POS: DIC: INTERFACES
CON: DIC: EXTERNAL
PRE: DIR: CLASSIFIED

It appears to be replacing the “prompt” and the “command” with [object] [Object]

$/ ls

when I press enter, it gets replaced with:

[object] [Object]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
linuswillnercommented, Jul 11, 2021

Alright, so, I finally have time to look into this now. I’ve seen enough forks that fix this issue to the point that I now know where it’s coming from. I’ll fix it ASAP.

1reaction
linuswillnercommented, Jun 2, 2022

Hi all, sorry for the terribly long wait, life’s been way too busy for me to work on a library I first wrote when I was 17 years old, lol. But I am pleased to announce I’m going to fix this bug right now! (Better late than never, I hope)

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - What does [object Object] mean? - Stack Overflow
Usually, when you're talking about "objects" in Javascript, you actually mean "Object objects", and not the other types. where stringify should ...
Read more >
[object, object] in JavaScript – Meaning in JS - freeCodeCamp
[object, object] is the string representation of a JavaScript object data type. You'll understand better as we go further in this article.
Read more >
Object.values() - JavaScript - MDN Web Docs
The Object.values() static method returns an array of a given object's own enumerable string-keyed property values.
Read more >
[object Object] return from JSON array - ServiceNow Community
Solved: Below is a piece of the JSON response from a rest message we sent to a third party. We are having issues...
Read more >
[object Object]: What does this mean? - Career Karma
You can view the contents of an object using console.log(), JSON.stringify(), or a for…in loop. When developing using JavaScript, many of us ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found