Catch RangeError instead of TypeError

This commit is contained in:
Sheng
2018-08-23 20:41:06 +08:00
parent e329a6b55b
commit 4d11a2ce2d
+1 -1
View File
@@ -123,7 +123,7 @@ jQuery(function($){
decoder = new window.TextDecoder(new_encoding);
encoding = new_encoding;
console.log('Set encoding to ' + encoding);
} catch(TypeError) {
} catch(RangeError) {
console.log('Unknown encoding ' + new_encoding);
}
}