Merge pull request #4807 from emanuelschuetze/text-encode

Use npm package text-encoding to fix IE11/Edge login.
This commit is contained in:
Emanuel Schütze 2019-06-27 22:24:27 +02:00 committed by GitHub
commit cc0e8f0829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@
"pdfmake": "^0.1.53",
"po2json": "^1.0.0-alpha",
"rxjs": "^6.5.1",
"text-encoding": "^0.7.0",
"tinymce": "^4.9.2",
"uuid": "^3.3.2",
"zone.js": "~0.8.26"

View File

@ -6,6 +6,7 @@ import { TranslateService } from '@ngx-translate/core';
import { Observable, Subject } from 'rxjs';
import { take } from 'rxjs/operators';
import { compress, decompress } from 'lz4js';
import { TextDecoder, TextEncoder } from 'text-encoding';
import { formatQueryParams, QueryParams } from '../query-params';
import { OpenSlidesStatusService } from './openslides-status.service';
@ -281,7 +282,7 @@ export class WebsocketService {
1024} KB uncompressed), ratio ${decompressedBuffer.byteLength / compressedSize}`
);
const textDecoder = new TextDecoder();
data = textDecoder.decode(decompressedBuffer);
data = textDecoder.decode(decompressedBuffer) as string;
}
const message: IncommingWebsocketMessage = JSON.parse(data);