1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-03 16:44:12 +02:00

Fix writing pvs

This commit is contained in:
Robin Appelman 2017-09-27 01:01:56 +02:00
commit 19b10b253f

View file

@ -28,7 +28,7 @@ function readPVSType(stream: BitStream): PVS {
function writePVSType(pvs: PVS, stream: BitStream) {
const raw = pvsReverseMap.get(pvs);
if (!raw) {
if (typeof raw === 'undefined') {
throw new Error(`Unknown pvs ${pvs}`);
}
stream.writeBits(raw, 2);