mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Simplify the isPDFFunction
helper function
Originally we used helper functions for checking if something was a Dictionary or Stream, and then having an initial `typeof` check probably made sense. However, given that we're using `instanceof` nowadays the additional check longer seems necessary.
This commit is contained in:
parent
384bd96165
commit
20cbb89412
1 changed files with 1 additions and 3 deletions
|
@ -502,9 +502,7 @@ class PDFFunction {
|
|||
|
||||
function isPDFFunction(v) {
|
||||
let fnDict;
|
||||
if (typeof v !== "object") {
|
||||
return false;
|
||||
} else if (v instanceof Dict) {
|
||||
if (v instanceof Dict) {
|
||||
fnDict = v;
|
||||
} else if (v instanceof BaseStream) {
|
||||
fnDict = v.dict;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue