Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update default function name
Browse files Browse the repository at this point in the history
jackiequach committed Jun 26, 2024
1 parent fda0fa4 commit 7f37fb6
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/PdfReader/index.tsx
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/PdfReader/lib.ts
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ export const loadResource = async (
/**
* Fetches a resource url as text
*/
export async function fetchAsTxt(url: string): Promise<string> {
export async function getContentDefault(url: string): Promise<string> {
return url;
}

0 comments on commit 7f37fb6

Please sign in to comment.