Catch RangeError instead of TypeError
This commit is contained in:
@@ -123,7 +123,7 @@ jQuery(function($){
|
|||||||
decoder = new window.TextDecoder(new_encoding);
|
decoder = new window.TextDecoder(new_encoding);
|
||||||
encoding = new_encoding;
|
encoding = new_encoding;
|
||||||
console.log('Set encoding to ' + encoding);
|
console.log('Set encoding to ' + encoding);
|
||||||
} catch(TypeError) {
|
} catch(RangeError) {
|
||||||
console.log('Unknown encoding ' + new_encoding);
|
console.log('Unknown encoding ' + new_encoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user