summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorhackademix2018-07-16 15:55:01 +0200
committerhackademix2018-07-16 15:55:01 +0200
commitad6187dfd8e7a705ef417345a5cbf780c0dd7259 (patch)
treeb236086f12830a908795822cb5d972eaaa7f33d8 /src/lib
parentf6b7232857f70be4614e57bcce0bb72623e9058e (diff)
downloadnoscript-ad6187dfd8e7a705ef417345a5cbf780c0dd7259.tar.gz
noscript-ad6187dfd8e7a705ef417345a5cbf780c0dd7259.tar.xz
noscript-ad6187dfd8e7a705ef417345a5cbf780c0dd7259.zip
Cosmetic bug fixes.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ContentMetaData.js5
1 files changed, 3 insertions, 2 deletions
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);
}