Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect - not firing... #1298

Open
1 task done
MarketingPip opened this issue Sep 5, 2024 · 0 comments
Open
1 task done

Could not connect - not firing... #1298

MarketingPip opened this issue Sep 5, 2024 · 0 comments
Labels
bug unconfirmed not yet verified as an issue

Comments

@MarketingPip
Copy link

Please, check for existing issues to avoid duplicates.

  • No similar issues found.

What happened?

When a false / non existing ID is given from a string it doesn't fire a error.

Example:

import { Peer } from "https://esm.sh/peerjs";

let peer = new Peer();
let peerId = "112dffddff";

peerId = peerId.trim();

const conn = peer.connect(peerId);

conn.on("error", (err) => {
  console.log(err);
});

But oddly when grabbing string ie ID from my function - await term.input() from my - Termino.js library - see here

Like this:
Example:

import { Peer } from "https://esm.sh/peerjs";

let peer = new Peer();
let peerId =  await term.input()

const conn = peer.connect(peerId);

conn.on("error", (err) => {
  console.log(err);
});

It does fire....

How can we reproduce the issue?

No response

What do you expected to happen?

Events to fire correctly.

Environment setup

  • Browser: Chrome

Is this a regression?

No response

Anything else?

No response

@MarketingPip MarketingPip added bug unconfirmed not yet verified as an issue labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unconfirmed not yet verified as an issue
Projects
None yet
Development

No branches or pull requests

1 participant