diff --git a/src/PdfReader/index.tsx b/src/PdfReader/index.tsx index 2a802b26..153f4acb 100644 --- a/src/PdfReader/index.tsx +++ b/src/PdfReader/index.tsx @@ -13,7 +13,12 @@ import { DEFAULT_SHOULD_GROW_WHEN_SCROLLING, } from '../constants'; import LoadingSkeleton from '../ui/LoadingSkeleton'; -import { fetchAsTxt, getResourceUrl, loadResource, SCALE_STEP } from './lib'; +import { + getContentDefault, + getResourceUrl, + loadResource, + SCALE_STEP, +} from './lib'; import { makePdfReducer } from './reducer'; /** @@ -35,7 +40,7 @@ export default function usePdfReader(args: ReaderArguments): ReaderReturn { webpubManifestUrl, manifest, proxyUrl, - getContent = fetchAsTxt, + getContent = getContentDefault, injectablesReflowable, injectablesFixed, height = DEFAULT_HEIGHT, diff --git a/src/PdfReader/lib.ts b/src/PdfReader/lib.ts index 6f94270f..e0ff00c1 100644 --- a/src/PdfReader/lib.ts +++ b/src/PdfReader/lib.ts @@ -36,7 +36,7 @@ export const loadResource = async ( /** * Fetches a resource url as text */ -export async function fetchAsTxt(url: string): Promise { +export async function getContentDefault(url: string): Promise { return url; }