Catch RangeError instead of TypeError

pull/26/head
Sheng 2018-08-23 20:41:06 +08:00
parent e329a6b55b
commit 4d11a2ce2d
1 changed files with 1 additions and 1 deletions

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);
}
}