From ad6187dfd8e7a705ef417345a5cbf780c0dd7259 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 16 Jul 2018 15:55:01 +0200 Subject: Cosmetic bug fixes. --- src/lib/ContentMetaData.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/ContentMetaData.js b/src/lib/ContentMetaData.js index c60d75e..da335ad 100644 --- a/src/lib/ContentMetaData.js +++ b/src/lib/ContentMetaData.js @@ -17,12 +17,13 @@ class ContentMetaData { charset = m[1]; } } - Object.defineProperty(this, "charset", { value: charset, writable: false, configurable: true }) + Object.defineProperty(this, "charset", { value: charset, writable: false, configurable: true }); + return charset; } createDecoder() { try { - return new TextDecoder(charset); + return new TextDecoder(this.charset); } catch (e) { return new TextDecoder(this.defaultCharset); } -- cgit v1.2.3