We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cb4a86 commit 7594012Copy full SHA for 7594012
src/encoding.ts
@@ -1,7 +1,9 @@
1
import { jschardet } from "./vscodeModules";
2
3
-jschardet.Constants.MINIMUM_THRESHOLD = 0.2;
4
-jschardet.MacCyrillicModel.mTypicalPositiveRatio += 0.001;
+if (jschardet.Constants) {
+ jschardet.Constants.MINIMUM_THRESHOLD = 0.2;
5
+ jschardet.MacCyrillicModel.mTypicalPositiveRatio += 0.001;
6
+}
7
8
function detectEncodingByBOM(buffer: Buffer): string | null {
9
if (!buffer || buffer.length < 2) {
0 commit comments