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

Remove the isStream helper function

At this point all the various Stream-classes extends an abstract base-class, hence this helper function is no longer necessary and only adds unnecessary indirection in the code.
This commit is contained in:
Jonas Jenwald 2022-02-17 13:45:42 +01:00
parent d9a3a24353
commit 1a31855977
15 changed files with 51 additions and 80 deletions

View file

@ -39,15 +39,8 @@ import {
createDefaultAppearance,
parseDefaultAppearance,
} from "./default_appearance.js";
import {
Dict,
isDict,
isName,
isRef,
isStream,
Name,
RefSet,
} from "./primitives.js";
import { Dict, isDict, isName, isRef, Name, RefSet } from "./primitives.js";
import { BaseStream } from "./base_stream.js";
import { bidi } from "./bidi.js";
import { Catalog } from "./catalog.js";
import { ColorSpace } from "./colorspace.js";
@ -693,7 +686,7 @@ class Annotation {
// In case the normal appearance is a stream, then it is used directly.
const normalAppearanceState = appearanceStates.get("N");
if (isStream(normalAppearanceState)) {
if (normalAppearanceState instanceof BaseStream) {
this.appearance = normalAppearanceState;
return;
}