1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Remove unreachable logic after error(...) is called.

The function error(...) always throws so there is no need to return separately
or have an else branch.
This commit is contained in:
Kalervo Kujala 2012-03-20 14:16:48 +02:00
parent cdbbd76594
commit eb4ec7899a
5 changed files with 29 additions and 44 deletions

View file

@ -494,10 +494,8 @@ var FontLoader = {
// 82402.
// Validate the names parameter -- the values can used to construct HTML.
if (!/^\w+$/.test(names.join(''))) {
if (!/^\w+$/.test(names.join('')))
error('Invalid font name(s): ' + names.join());
return; // Keep the return in case if error() did not throw.
}
var div = document.createElement('div');
div.setAttribute('style',