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

Options are required for announce #14

Open
okdistribute opened this issue Dec 4, 2019 · 0 comments
Open

Options are required for announce #14

okdistribute opened this issue Dec 4, 2019 · 0 comments

Comments

@okdistribute
Copy link

okdistribute commented Dec 4, 2019

d.announce(key, opts) doesn't properly check to see if opts is empty before bailing.

/home/okdistribute/node_modules/workshop/node_modules/@hyperswarm/discovery/index.js:229
      localPort: opts.localPort || opts.port || 0,
                      ^

TypeError: Cannot read property 'localPort' of undefined
    at Discovery.announce (/home/okdistribute/node_modules/workshop/node_modules/@hyperswarm/discovery/index.js:229:23)
    at Object.<anonymous> (/home/okdistribute/node_modules/workshop/solutions/06/discovery.js:5:7)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11
@okdistribute okdistribute changed the title example is broken Options are required for announce Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant