Skip to content

legacy.ts doesn't work anymore #300

@erikdubbelboer

Description

@erikdubbelboer

legacy.ts was added in #13 so games that don't use NPM can include <script src="https://unpkg.com/@poki/netlib@0.0.18/dist/legacy.js"><script>.

I'm not sure when, but I guess a while ago it broke on these lines:

netlib/lib/peer.ts

Lines 61 to 63 in d983058

(async () => {
try {
if (this.closing) {

This compiles to:

(async function() {
  try {
    if (t.closing)

where t is somehow undefined.
Image

There is a )().catch(e => {}) below it which then swallows this error.

This seems like a bug in the compiler and I'm not sure how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions