HMI-Studios / CivCloneJS

3 stars 1 forks source link

Bug: Frontend throws error when loading game with no units #112

Closed JoelNiemela closed 2 years ago

JoelNiemela commented 2 years ago

The frontend writes this error message in the console when joining a game with no units in it:

Uncaught TypeError: tilePos is undefined (camera.ts:134:18)
    toCameraPos camera.ts:134
    beginTurn world.ts:405
    handleResponse world.ts:263
    connect world.ts:320
    connect world.ts:312
    __awaiter world.js:7
    __awaiter world.js:3
    connect world.ts:301
    connect world.ts:301
    __awaiter world.js:7
    __awaiter world.js:3
    connect world.js:204
    connect world.ts:337
    __awaiter world.js:7
    __awaiter world.js:3
    connect world.ts:326
    connect world.ts:326
    __awaiter world.js:7
    __awaiter world.js:3
    connect world.ts:301
    connect world.ts:301
    __awaiter world.js:7
    __awaiter world.js:3
    connect world.js:204
    setup world.ts:517
    __awaiter world.js:7
    __awaiter world.js:3
    setup world.js:264
    main app.ts:122
    fulfilled world.js:4
    promise callback*step world.js:6
    fulfilled world.js:4
    promise callback*step world.js:6
    __awaiter world.js:7
    __awaiter world.js:3
    main app.ts:108
    <anonymous> app.ts:125