mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Removes rest of 'no-else-return' comments.
This commit is contained in:
parent
6265bb6038
commit
77b7b84d1e
2 changed files with 53 additions and 53 deletions
|
@ -360,25 +360,25 @@ var FontFaceObject = (function FontFaceObjectClosure() {
|
|||
}
|
||||
FontFaceObject.prototype = {
|
||||
createNativeFontFace: function FontFaceObject_createNativeFontFace() {
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) {
|
||||
if (!this.data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.options.disableFontFace) {
|
||||
this.disableFontFace = true;
|
||||
return null;
|
||||
}
|
||||
|
||||
var nativeFontFace = new FontFace(this.loadedName, this.data, {});
|
||||
|
||||
if (this.options.fontRegistry) {
|
||||
this.options.fontRegistry.registerFont(this);
|
||||
}
|
||||
return nativeFontFace;
|
||||
} else { // eslint-disable-line no-else-return
|
||||
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('MOZCENTRAL')) {
|
||||
throw new Error('Not implemented: createNativeFontFace');
|
||||
}
|
||||
|
||||
if (!this.data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.options.disableFontFace) {
|
||||
this.disableFontFace = true;
|
||||
return null;
|
||||
}
|
||||
|
||||
var nativeFontFace = new FontFace(this.loadedName, this.data, {});
|
||||
|
||||
if (this.options.fontRegistry) {
|
||||
this.options.fontRegistry.registerFont(this);
|
||||
}
|
||||
return nativeFontFace;
|
||||
},
|
||||
|
||||
createFontFaceRule: function FontFaceObject_createFontFaceRule() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue